1
This commit is contained in:
@@ -3,12 +3,7 @@ import ParentView from './parent-view'
|
||||
|
||||
// 导入页面组件
|
||||
import pages from '../views/index'
|
||||
const {
|
||||
LoginPage,
|
||||
Page401,
|
||||
Page404,
|
||||
Page500
|
||||
} = pages
|
||||
const {LoginPage,Page401,Page404,Page500} = pages
|
||||
|
||||
import Tables from './tables'
|
||||
import UploadSingle from './upload/Single.vue'
|
||||
@@ -26,8 +21,10 @@ import fieldItem from './tables/fieldItem.vue'
|
||||
import FieldRenderer from './tables/fieldRenderer.vue'
|
||||
|
||||
|
||||
|
||||
|
||||
// 注册全局组件的方法
|
||||
export function registerGlobalComponents(Vue) {
|
||||
const registerGlobalComponents = (Vue) => {
|
||||
Vue.component('Main', Main)
|
||||
Vue.component('ParentView', ParentView)
|
||||
|
||||
@@ -54,7 +51,7 @@ export function registerGlobalComponents(Vue) {
|
||||
}
|
||||
|
||||
// 注册自定义组件的方法
|
||||
export function registerComponents(Vue, components = {}) {
|
||||
const registerComponents = (Vue, components = {}) => {
|
||||
Object.keys(components).forEach(name => {
|
||||
Vue.component(name, components[name])
|
||||
})
|
||||
@@ -65,6 +62,7 @@ export {
|
||||
registerComponents
|
||||
}
|
||||
|
||||
|
||||
export default {
|
||||
Main,
|
||||
ParentView,
|
||||
@@ -83,7 +81,6 @@ export default {
|
||||
fieldItem,
|
||||
FieldRenderer,
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ import storeModules, { createStore } from './store'
|
||||
import { createBaseRoutes, setupRouterGuards, createRouter, getRoutes } from './router'
|
||||
|
||||
|
||||
import components from './components/index'
|
||||
import { registerGlobalComponents } from './components/index'
|
||||
import components ,{ registerGlobalComponents} from './components/index'
|
||||
|
||||
import pages from './views/index'
|
||||
|
||||
const { LoginPage, Page401, Page404, Page500, setupComponentMap } = pages
|
||||
|
||||
@@ -5,8 +5,8 @@ import appModule from './app'
|
||||
export function createStore(Vuex, customModules = {}, createPersistedState) {
|
||||
const store = new Vuex.Store({
|
||||
modules: {
|
||||
user: appModule,
|
||||
app: userModule,
|
||||
user: userModule,
|
||||
app: appModule,
|
||||
...customModules
|
||||
},
|
||||
plugins: createPersistedState ? [
|
||||
|
||||
Reference in New Issue
Block a user