增加了bus 增加了分块区滚动 增加了table 增加了分页 修改了某些分页接口 角色增删
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
const _import = require('./_import') //获取组件的方法
|
||||
export const asyncRouterHandle = (asyncRouter) => {
|
||||
asyncRouter.map(item => {
|
||||
item.component = _import(item.component)
|
||||
if (item.component) {
|
||||
item.component = _import(item.component)
|
||||
} else {
|
||||
delete item['component']
|
||||
}
|
||||
if (item.children) {
|
||||
asyncRouterHandle(item.children)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
const install = (Vue) => {
|
||||
const Bus = new Vue({
|
||||
methods: {
|
||||
emit(event, ...args) {
|
||||
this.$emit(event, ...args)
|
||||
},
|
||||
on(event, cb) {
|
||||
this.$on(event, cb)
|
||||
},
|
||||
off(event, cb) {
|
||||
this.$off(event, cb)
|
||||
}
|
||||
},
|
||||
})
|
||||
Vue.prototype.$bus = Bus
|
||||
}
|
||||
|
||||
export default install
|
||||
Reference in New Issue
Block a user