|
|
@ -46,12 +46,19 @@ export const constantRoutes = [ |
|
|
|
path: '/', |
|
|
|
path: '/', |
|
|
|
component: Layout, |
|
|
|
component: Layout, |
|
|
|
redirect: '/filemange', // 重定向地址
|
|
|
|
redirect: '/filemange', // 重定向地址
|
|
|
|
children: [{ |
|
|
|
name: 'filemange', |
|
|
|
path: 'filemange', |
|
|
|
alwaysShow: false, |
|
|
|
name: 'Filemange', |
|
|
|
meta: { title: '文件管理', icon: 'el-icon-s-help' }, |
|
|
|
component: () => import('@/views/filemange/index'), |
|
|
|
children: [ |
|
|
|
meta: { title: '文件管理', icon: 'dashboard' } |
|
|
|
{ |
|
|
|
}] |
|
|
|
path: 'filemange', |
|
|
|
|
|
|
|
name: 'Filemange', |
|
|
|
|
|
|
|
component: () => import('@/views/filemange/index'), |
|
|
|
|
|
|
|
meta: { title: '文件管理', icon: 'dashboard' } |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
path: '', |
|
|
|
path: '', |
|
|
@ -64,31 +71,6 @@ export const constantRoutes = [ |
|
|
|
meta: { title: '用户管理', icon: 'dashboard' } |
|
|
|
meta: { title: '用户管理', icon: 'dashboard' } |
|
|
|
}] |
|
|
|
}] |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: '/',
|
|
|
|
|
|
|
|
// component: Layout,
|
|
|
|
|
|
|
|
// redirect: '/filemange', // 重定向地址
|
|
|
|
|
|
|
|
// children: [{
|
|
|
|
|
|
|
|
// path: 'filemange',
|
|
|
|
|
|
|
|
// name: 'filemange',
|
|
|
|
|
|
|
|
// component: () => import('@/views/dashboard/index?a=1'),
|
|
|
|
|
|
|
|
// meta: { title: '文件管理', icon: 'dashboard' }
|
|
|
|
|
|
|
|
// }]
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: '/',
|
|
|
|
|
|
|
|
// component: Layout,
|
|
|
|
|
|
|
|
// redirect: '/usermange',
|
|
|
|
|
|
|
|
// children: [{
|
|
|
|
|
|
|
|
// path: 'usermange',
|
|
|
|
|
|
|
|
// name: 'usermange',
|
|
|
|
|
|
|
|
// component: () => import('@/views/dashboard/index?a=2'),
|
|
|
|
|
|
|
|
// meta: { title: '用户管理', icon: 'dashboard' }
|
|
|
|
|
|
|
|
// }]
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
{ |
|
|
|
path: '/systme', |
|
|
|
path: '/systme', |
|
|
|
component: Layout, |
|
|
|
component: Layout, |
|
|
@ -107,96 +89,32 @@ export const constantRoutes = [ |
|
|
|
name: 'userrelated', |
|
|
|
name: 'userrelated', |
|
|
|
component: () => import('@/views/systme/userrelated'), |
|
|
|
component: () => import('@/views/systme/userrelated'), |
|
|
|
meta: { title: '用户相关', icon: 'tree' } |
|
|
|
meta: { title: '用户相关', icon: 'tree' } |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
path: 'userrelated2', |
|
|
|
|
|
|
|
name: 'userrelated2', |
|
|
|
|
|
|
|
component: () => import('@/views/systme/userrelated'), |
|
|
|
|
|
|
|
meta: { title: '皮肤更换', icon: 'tree' } |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
path: 'external-link', |
|
|
|
|
|
|
|
component: Layout, |
|
|
|
|
|
|
|
children: [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
path: 'https://dev.filesite.io/', |
|
|
|
|
|
|
|
meta: { title: '前端展示页面', icon: 'link' } |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: '/form',
|
|
|
|
|
|
|
|
// component: Layout,
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: 'index',
|
|
|
|
|
|
|
|
// name: 'Form',
|
|
|
|
|
|
|
|
// component: () => import('@/views/form/index'),
|
|
|
|
|
|
|
|
// meta: { title: 'Form', icon: 'form' }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ]
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: '/nested',
|
|
|
|
|
|
|
|
// component: Layout,
|
|
|
|
|
|
|
|
// redirect: '/nested/menu1',
|
|
|
|
|
|
|
|
// name: 'Nested',
|
|
|
|
|
|
|
|
// meta: {
|
|
|
|
|
|
|
|
// title: 'Nested',
|
|
|
|
|
|
|
|
// icon: 'nested'
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: 'menu1',
|
|
|
|
|
|
|
|
// component: () => import('@/views/nested/menu1/index'), // Parent router-view
|
|
|
|
|
|
|
|
// name: 'Menu1',
|
|
|
|
|
|
|
|
// meta: { title: 'Menu1' },
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: 'menu1-1',
|
|
|
|
|
|
|
|
// component: () => import('@/views/nested/menu1/menu1-1'),
|
|
|
|
|
|
|
|
// name: 'Menu1-1',
|
|
|
|
|
|
|
|
// meta: { title: 'Menu1-1' }
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: 'menu1-2',
|
|
|
|
|
|
|
|
// component: () => import('@/views/nested/menu1/menu1-2'),
|
|
|
|
|
|
|
|
// name: 'Menu1-2',
|
|
|
|
|
|
|
|
// meta: { title: 'Menu1-2' },
|
|
|
|
|
|
|
|
// children: [
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: 'menu1-2-1',
|
|
|
|
|
|
|
|
// component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
|
|
|
|
|
|
|
|
// name: 'Menu1-2-1',
|
|
|
|
|
|
|
|
// meta: { title: 'Menu1-2-1' }
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: 'menu1-2-2',
|
|
|
|
|
|
|
|
// component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
|
|
|
|
|
|
|
|
// name: 'Menu1-2-2',
|
|
|
|
|
|
|
|
// meta: { title: 'Menu1-2-2' }
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: 'menu1-2-3',
|
|
|
|
|
|
|
|
// component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
|
|
|
|
|
|
|
|
// name: 'jiamaluo',
|
|
|
|
|
|
|
|
// meta: { title: 'jialmal' }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ]
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: 'menu1-3',
|
|
|
|
|
|
|
|
// component: () => import('@/views/nested/menu1/menu1-3'),
|
|
|
|
|
|
|
|
// name: 'Menu1-3',
|
|
|
|
|
|
|
|
// meta: { title: 'Menu1-3' }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ]
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
// {
|
|
|
|
|
|
|
|
// path: 'menu2',
|
|
|
|
|
|
|
|
// component: () => import('@/views/nested/menu2/index'),
|
|
|
|
|
|
|
|
// name: 'Menu2',
|
|
|
|
|
|
|
|
// meta: { title: 'menu2' }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// ]
|
|
|
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 404 page must be placed at the end !!!
|
|
|
|
// 404 page must be placed at the end !!!
|
|
|
|
{ path: '*', redirect: '/404', hidden: true } |
|
|
|
{ path: '*', redirect: '/404', hidden: true } |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
const createRouter = () => new Router({ |
|
|
|
const createRouter = () => new Router({ |
|
|
|
// mode: 'history', // require service support
|
|
|
|
//mode: 'history', // require service support
|
|
|
|
scrollBehavior: () => ({ y: 0 }), |
|
|
|
scrollBehavior: () => ({ y: 0 }), |
|
|
|
routes: constantRoutes |
|
|
|
routes: constantRoutes |
|
|
|
}) |
|
|
|
}) |
|
|
@ -206,7 +124,12 @@ const router = createRouter() |
|
|
|
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
|
|
|
|
// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465
|
|
|
|
export function resetRouter() { |
|
|
|
export function resetRouter() { |
|
|
|
const newRouter = createRouter() |
|
|
|
const newRouter = createRouter() |
|
|
|
router.matcher = newRouter.matcher // reset router
|
|
|
|
router.matcher = newRouter.matcher // reset router 重置路由器
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// router.reloadRouter = function () {
|
|
|
|
|
|
|
|
// router.matcher = new Router({
|
|
|
|
|
|
|
|
// mode: "history",
|
|
|
|
|
|
|
|
// constantRoutes
|
|
|
|
|
|
|
|
// }).matcher
|
|
|
|
|
|
|
|
// }
|
|
|
|
export default router |
|
|
|
export default router |
|
|
|