fix: 修复系统组件,如果没有配置封面图片的时候,出现组件列表不显示,并控制台出错的问题

main
wu.jian2 1 year ago
parent 07cfc055cf
commit 865af9120a

@ -8,8 +8,18 @@ const innerRemoteComponents = []
files.keys().forEach(key => {
const title = key.split('/')[1].replace('.vue', '')
const img = require(`./innerComponents/${title}/component.png`)
const config = require(`./innerComponents/${title}/config.js`).default
let img = null
let config = {}
try {
img = require(`./innerComponents/${title}/component.png`)
} catch (error) {
console.log(error)
}
try {
config = require(`./innerComponents/${title}/config.js`).default
} catch (error) {
}
innerRemoteComponents.push({
title: config.title || title,
vueSysComponentDirName: 'inner_' + title,

Loading…
Cancel
Save