mirror of
https://github.com/fantastic-admin/basic.git
synced 2026-10-06 18:24:07 +08:00
feat: 自动生成页面模板增加基于文件系统路由的配置项
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
{{#if isFilesystem}}
|
||||
<route lang="yaml">
|
||||
meta:
|
||||
title: 页面标题
|
||||
</route>
|
||||
{{/if}}
|
||||
|
||||
<script lang="ts" setup name="{{ properCase componentName }}">
|
||||
// 逻辑代码
|
||||
</script>
|
||||
|
||||
@@ -36,6 +36,12 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'confirm',
|
||||
name: 'isFilesystem',
|
||||
message: '是否为基于文件系统的路由页面',
|
||||
default: false,
|
||||
},
|
||||
],
|
||||
actions: (data) => {
|
||||
const relativePath = path.relative('src/views', data.path)
|
||||
|
||||
Reference in New Issue
Block a user