-
-
Notifications
You must be signed in to change notification settings - Fork 488
Open
Labels
Bug该 Issue 提出了一个 Bug该 Issue 提出了一个 Bug
Description
设备型号:
all
LinUI 版本:
0.9.4
微信小程序基础库版本:
all
问题描述及重现步骤:
按照文档在config中添加calendar组件,运行npm run build后, Calendar目录下未build出其所有的components文件及内容
补充说明
修改build/until.js中的forParams函数可得到期待结果
const forParams = (arr) => {
let finishArr = [];
arr.map(item => {
let data = fs.readFileSync(`../src/${item}/index.json`, 'utf-8');
const params = JSON.parse(data);
const {
usingComponents
} = params;
if (usingComponents && !isEmptyObj(usingComponents)) {
for (let [key, path] of Object.entries(usingComponents)) {
if (key.startsWith('l-')) {
key = key.substring(2, key.length);
} else {
key = formatKeyByPath(path, item)
}
finishArr.push(key);
}
componentArr.push(...finishArr);
forParams(finishArr);
}
});
};
const formatKeyByPath = (path, parent) => {
path = path.startsWith('./') ? path.replace('./', '').replace('/index', '') : path.replace('/index', '')
return parent + '/' + path
}
相关截图
Metadata
Metadata
Assignees
Labels
Bug该 Issue 提出了一个 Bug该 Issue 提出了一个 Bug