This commit is contained in:
张成
2025-10-09 23:26:40 +08:00
parent b81e768035
commit 0b78af46cd
25 changed files with 70 additions and 427 deletions

View File

@@ -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