mirror of
https://github.com/vastxie/99AI.git
synced 2025-09-22 03:26:38 +08:00
29 lines
560 B
JavaScript
Executable File
29 lines
560 B
JavaScript
Executable File
export default {
|
|
description: '创建全局状态',
|
|
prompts: [
|
|
{
|
|
type: 'input',
|
|
name: 'name',
|
|
message: '请输入模块名称',
|
|
validate: (v) => {
|
|
if (!v || v.trim === '') {
|
|
return '模块名称不能为空'
|
|
}
|
|
else {
|
|
return true
|
|
}
|
|
},
|
|
},
|
|
],
|
|
actions: () => {
|
|
const actions = [
|
|
{
|
|
type: 'add',
|
|
path: 'src/store/modules/{{camelCase name}}.ts',
|
|
templateFile: 'plop-templates/store/index.hbs',
|
|
},
|
|
]
|
|
return actions
|
|
},
|
|
}
|