diff --git a/plop-templates/page/index.hbs b/plop-templates/page/index.hbs index acabfe32..c9dadfd1 100644 --- a/plop-templates/page/index.hbs +++ b/plop-templates/page/index.hbs @@ -1,3 +1,10 @@ +{{#if isFilesystem}} + +meta: + title: 页面标题 + +{{/if}} + diff --git a/plop-templates/page/prompt.js b/plop-templates/page/prompt.js index 1de90119..83410eec 100644 --- a/plop-templates/page/prompt.js +++ b/plop-templates/page/prompt.js @@ -36,6 +36,12 @@ module.exports = { } }, }, + { + type: 'confirm', + name: 'isFilesystem', + message: '是否为基于文件系统的路由页面', + default: false, + }, ], actions: (data) => { const relativePath = path.relative('src/views', data.path)