提交 69f2662f 编写于 作者: richard_1015's avatar richard_1015

chore: config script modify

上级 afdfb146
......@@ -6,9 +6,11 @@ let importStr = `import { App } from 'vue';\n`;
const packages = [];
config.nav.map(item => {
item.packages.forEach(element => {
let { name, show } = element;
let { name, show, type } = element;
if (show) {
importStr += `import ${name} from './packages/${name.toLowerCase()}/index.vue';\n`;
importStr += `import ${name} from './packages/${name.toLowerCase()}/index${
type === 'methods' ? '' : '.vue'
}';\n`;
packages.push(name);
}
});
......
......@@ -33,7 +33,6 @@ fs.writeFile(
fileStr,
'utf8',
error => {
console.log(error);
// logger.success(`${package_config_path} 文件写入成功`);
}
);
......
......@@ -151,7 +151,7 @@
"name": "Toast",
"sort": "1",
"cName": "吐司",
"type": "component",
"type": "methods",
"show": true,
"desc": "轻提示",
"author": "undo"
......@@ -160,7 +160,7 @@
"version": "3.0.0",
"name": "Notify",
"type": "component",
"cName": "消息提示",
"cName": "methods",
"desc": "在页面顶部展示消息提示,支持函数调用和组件调用两种方式",
"sort": 4,
"show": true,
......@@ -275,7 +275,7 @@
},
{
"name": "Dialog",
"type": "component",
"type": "methods",
"cName": "对话框",
"desc": "模态对话框,在浮层中显示,引导用户进行相关操作,支持图片对话框。",
"sort": 8,
......
......@@ -9,7 +9,7 @@
"jsx": "preserve",
"sourceMap": false,
"declaration": false,
"removeComments":true,
"removeComments": true,
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册