refactor: adjust routes
This commit is contained in:
parent
ef3aaa5be5
commit
0bb2a904e7
@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<n-breadcrumb>
|
||||
<n-breadcrumb-item v-for="item in route.matched" :key="item.path" @click="handleBreadClick(item.path)">
|
||||
<n-breadcrumb-item
|
||||
v-for="item in route.matched.filter((item) => !!item.meta?.title)"
|
||||
:key="item.path"
|
||||
@click="handleBreadClick(item.path)"
|
||||
>
|
||||
<component :is="renderIcon(item.meta?.icon, { size: 16 })" v-if="item.meta?.icon" />
|
||||
{{ item.meta.title }}
|
||||
</n-breadcrumb-item>
|
||||
|
@ -9,7 +9,7 @@ export const basicRoutes = [
|
||||
},
|
||||
|
||||
{
|
||||
name: 'LOGIN',
|
||||
name: 'Login',
|
||||
path: '/login',
|
||||
component: () => import('@/views/login/index.vue'),
|
||||
isHidden: true,
|
||||
@ -25,7 +25,7 @@ export const basicRoutes = [
|
||||
meta: {
|
||||
title: '外部链接',
|
||||
icon: 'mdi:link-variant',
|
||||
index: 1,
|
||||
index: 2,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ export default {
|
||||
meta: {
|
||||
title: '错误页',
|
||||
icon: 'mdi:alert-circle-outline',
|
||||
index: 4,
|
||||
index: 99,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@ -10,6 +10,7 @@ export default {
|
||||
icon: 'mdi:menu',
|
||||
role: ['admin'],
|
||||
requireAuth: true,
|
||||
index: 3,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
|
@ -8,12 +8,13 @@ export default {
|
||||
meta: {
|
||||
title: '基础功能测试',
|
||||
icon: 'mdi:menu',
|
||||
index: 1,
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'Unocss',
|
||||
path: 'unocss',
|
||||
component: () => import('@/views/test-page/unocss/index.vue'),
|
||||
component: () => import('./unocss/index.vue'),
|
||||
meta: {
|
||||
title: '测试unocss',
|
||||
},
|
||||
@ -21,7 +22,7 @@ export default {
|
||||
{
|
||||
name: 'Message',
|
||||
path: 'message',
|
||||
component: () => import('@/views/test-page/message/index.vue'),
|
||||
component: () => import('./message/index.vue'),
|
||||
meta: {
|
||||
title: '测试Message',
|
||||
},
|
||||
@ -29,7 +30,7 @@ export default {
|
||||
{
|
||||
name: 'Dialog',
|
||||
path: 'dialog',
|
||||
component: () => import('@/views/test-page/dialog/index.vue'),
|
||||
component: () => import('./dialog/index.vue'),
|
||||
meta: {
|
||||
title: '测试Dialog',
|
||||
},
|
||||
@ -37,7 +38,7 @@ export default {
|
||||
{
|
||||
name: 'TestKeepAlive',
|
||||
path: 'keep-alive',
|
||||
component: () => import('@/views/test-page/keep-alive/index.vue'),
|
||||
component: () => import('./keep-alive/index.vue'),
|
||||
meta: {
|
||||
title: '测试Keep-Alive',
|
||||
keepAlive: true,
|
||||
|
@ -4,19 +4,16 @@ export default {
|
||||
name: 'Dashboard',
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/home',
|
||||
meta: {
|
||||
title: 'Dashboard',
|
||||
icon: 'mdi:chart-bar',
|
||||
},
|
||||
redirect: '/workbench',
|
||||
children: [
|
||||
{
|
||||
name: 'Home',
|
||||
path: 'home',
|
||||
name: 'Workbench',
|
||||
path: 'workbench',
|
||||
component: () => import('./index.vue'),
|
||||
meta: {
|
||||
title: '首页',
|
||||
title: '工作台',
|
||||
icon: 'mdi:home',
|
||||
index: 0,
|
||||
},
|
||||
},
|
||||
],
|
Loading…
Reference in New Issue
Block a user