1
This commit is contained in:
17
src/index.js
17
src/index.js
@@ -46,7 +46,9 @@ import LoadFlower from './components/load-flower'
|
||||
import SplitPane from './components/split-pane'
|
||||
import TextArea from './components/text-area'
|
||||
import CommonIcon from './components/common-icon'
|
||||
import Editor from './components/editor/index.vue'
|
||||
import Editor from './components/editor/index.vue'
|
||||
import editModal from './components/tables/editModal.vue'
|
||||
import fieldItem from './components/tables/fieldItem.vue'
|
||||
|
||||
import * as systemApi from './api/system'
|
||||
import * as systemHighApi from './api/system_high'
|
||||
@@ -120,7 +122,7 @@ class AdminFramework {
|
||||
Vue.prototype.$uiTool = uiTool
|
||||
|
||||
this.registerGlobalComponents(Vue)
|
||||
|
||||
|
||||
this.setupComponentMap(componentMap)
|
||||
|
||||
if (Vuex && !this.store) {
|
||||
@@ -166,9 +168,12 @@ class AdminFramework {
|
||||
Vue.component('TextArea', TextArea)
|
||||
Vue.component('CommonIcon', CommonIcon)
|
||||
Vue.component('Editor', Editor)
|
||||
Vue.component('editModal', editModal)
|
||||
Vue.component('fieldItem', fieldItem)
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Setup component map
|
||||
* @param {Object} customMap - custom component map
|
||||
@@ -185,17 +190,17 @@ class AdminFramework {
|
||||
'system_high/sys_title': SysTitle,
|
||||
...customMap
|
||||
}
|
||||
|
||||
|
||||
const map = {}
|
||||
Object.keys(components).forEach(path => {
|
||||
const cleanPath = path.replace(/\.vue$/, '')
|
||||
map[cleanPath] = components[path]
|
||||
map[cleanPath + '.vue'] = components[path]
|
||||
})
|
||||
|
||||
|
||||
uiTool.setComponentMap(map)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add custom component map
|
||||
* @param {Object} customMap - custom component map
|
||||
|
||||
Reference in New Issue
Block a user