mirror of
https://github.com/TangSengDaoDao/TangSengDaoDaoManager
synced 2025-06-06 01:03:45 +00:00
28 lines
552 B
JavaScript
Executable File
28 lines
552 B
JavaScript
Executable File
module.exports = {
|
|
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;
|
|
}
|
|
};
|