| 12345678910111213141516171819202122232425262728293031 |
- /** @param {import("plop").NodePlopAPI} plop */
- export default function (plop) {
- plop.setGenerator("curd-list", {
- description: "列表页骨架:PageSearch + PageContent + CrudToolbarLeft/Right + useCrudList",
- prompts: [
- {
- type: "input",
- name: "modulePath",
- message: "views 下路径(如 module_example/demo)",
- },
- {
- type: "input",
- name: "componentName",
- message: "组件 name(PascalCase,如 Demo)",
- },
- {
- type: "input",
- name: "permPrefix",
- message: "权限前缀(如 module_example:demo)",
- },
- ],
- actions: [
- {
- type: "add",
- path: "src/views/{{modulePath}}/index.vue",
- templateFile: "plop-templates/curd-list-page.vue.hbs",
- skipIfExists: true,
- },
- ],
- });
- }
|