feat:动态路由样式调整
This commit is contained in:
@@ -2,13 +2,12 @@ import {createRouter, createWebHashHistory, RouteRecordRaw} from 'vue-router'
|
||||
import Layout from '@/layout/index.vue'
|
||||
|
||||
|
||||
// 参数配置: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
||||
|
||||
// 参数说明: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
|
||||
export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/redirect',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
meta: {hidden: true},
|
||||
children: [
|
||||
{
|
||||
path: '/redirect/:path(.*)',
|
||||
@@ -19,22 +18,23 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/login',
|
||||
component: () => import('@/views/login/index.vue'),
|
||||
hidden: true
|
||||
meta: {hidden: true}
|
||||
},
|
||||
{
|
||||
path: '/404',
|
||||
component: () => import('@/views/error-page/404.vue'),
|
||||
hidden: true
|
||||
meta: {hidden: true}
|
||||
},
|
||||
{
|
||||
path: '/401',
|
||||
component: () => import('@/views/error-page/401.vue'),
|
||||
hidden: true
|
||||
meta:{hidden: true}
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/dashboard',
|
||||
meta:{hidden:true},
|
||||
children: [
|
||||
{
|
||||
path: 'dashboard',
|
||||
@@ -46,7 +46,6 @@ export const constantRoutes: Array<RouteRecordRaw> = [
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
routes: constantRoutes
|
||||
|
||||
Reference in New Issue
Block a user