feat: 自动生成页面模板增加基于文件系统路由的配置项

This commit is contained in:
Hooray
2023-02-25 12:08:06 +08:00
parent e1db00ce95
commit 1e2b21f841
2 changed files with 13 additions and 0 deletions
+7
View File
@@ -1,3 +1,10 @@
{{#if isFilesystem}}
<route lang="yaml">
meta:
title: 页面标题
</route>
{{/if}}
<script lang="ts" setup name="{{ properCase componentName }}">
// 逻辑代码
</script>
+6
View File
@@ -36,6 +36,12 @@ module.exports = {
}
},
},
{
type: 'confirm',
name: 'isFilesystem',
message: '是否为基于文件系统的路由页面',
default: false,
},
],
actions: (data) => {
const relativePath = path.relative('src/views', data.path)