调整配置

This commit is contained in:
aixianling
2021-11-19 10:39:30 +08:00
parent 69e3eda6e5
commit c27b87f17a

View File

@@ -1,4 +1,4 @@
const install = function (Vue, params) {
const install = function (Vue) {
if (install.installed) return
// 遍历注册全局组件
let apps = []
@@ -6,18 +6,10 @@ const install = function (Vue, params) {
if (contexts) {
contexts.keys().map(e => {
if (contexts(e).default) {
if (params?.apps) {
if (params?.apps.includes(contexts(e).default.name)) {
apps.push(contexts(e).default)
Vue.component(contexts(e).default.name, contexts(e).default)
}
} else {
apps.push(contexts(e).default)
Vue.component(contexts(e).default.name, contexts(e).default)
}
}
})
!!params?.showList && console.log(apps.map(e => e.name))
}
return Promise.resolve(apps)
}