调整配置
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
const install = function (Vue, params) {
|
const install = function (Vue) {
|
||||||
if (install.installed) return
|
if (install.installed) return
|
||||||
// 遍历注册全局组件
|
// 遍历注册全局组件
|
||||||
let apps = []
|
let apps = []
|
||||||
@@ -6,18 +6,10 @@ const install = function (Vue, params) {
|
|||||||
if (contexts) {
|
if (contexts) {
|
||||||
contexts.keys().map(e => {
|
contexts.keys().map(e => {
|
||||||
if (contexts(e).default) {
|
if (contexts(e).default) {
|
||||||
if (params?.apps) {
|
|
||||||
if (params?.apps.includes(contexts(e).default.name)) {
|
|
||||||
apps.push(contexts(e).default)
|
apps.push(contexts(e).default)
|
||||||
Vue.component(contexts(e).default.name, 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)
|
return Promise.resolve(apps)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user