mod: 修改路由name
This commit is contained in:
parent
d759c9b9ae
commit
c2145c0ddb
@ -34,7 +34,7 @@ export const basicRoutes = [
|
||||
},
|
||||
|
||||
{
|
||||
name: 'DASHBOARD',
|
||||
name: 'Dashboard',
|
||||
path: '/',
|
||||
component: Layout,
|
||||
redirect: '/home',
|
||||
@ -44,7 +44,7 @@ export const basicRoutes = [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'HOME',
|
||||
name: 'Home',
|
||||
path: 'home',
|
||||
component: Home,
|
||||
meta: {
|
||||
@ -56,7 +56,7 @@ export const basicRoutes = [
|
||||
},
|
||||
|
||||
{
|
||||
name: 'TEST',
|
||||
name: 'Test',
|
||||
path: '/test',
|
||||
component: Layout,
|
||||
redirect: '/test/unocss',
|
||||
@ -65,7 +65,7 @@ export const basicRoutes = [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'UNOCSS',
|
||||
name: 'Unocss',
|
||||
path: 'unocss',
|
||||
component: () => import('@/views/test-page/TestUnocss.vue'),
|
||||
meta: {
|
||||
@ -73,7 +73,7 @@ export const basicRoutes = [
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'MESSAGE',
|
||||
name: 'Message',
|
||||
path: 'message',
|
||||
component: () => import('@/views/test-page/TestMessage.vue'),
|
||||
meta: {
|
||||
@ -81,7 +81,7 @@ export const basicRoutes = [
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'DIALOG',
|
||||
name: 'Dialog',
|
||||
path: 'dialog',
|
||||
component: () => import('@/views/test-page/TestDialog.vue'),
|
||||
meta: {
|
||||
@ -89,7 +89,7 @@ export const basicRoutes = [
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'TEST-KEEP-ALIVE',
|
||||
name: 'TestKeepAlive',
|
||||
path: 'keep-alive',
|
||||
component: () => import('@/views/test-page/TestKeepAlive.vue'),
|
||||
meta: {
|
||||
@ -101,7 +101,7 @@ export const basicRoutes = [
|
||||
},
|
||||
|
||||
{
|
||||
name: 'ERROR-PAGE',
|
||||
name: 'ErrorPage',
|
||||
path: '/error-page',
|
||||
component: Layout,
|
||||
redirect: '/error-page/404',
|
||||
@ -122,7 +122,7 @@ export const basicRoutes = [
|
||||
},
|
||||
|
||||
{
|
||||
name: 'EXTERNAL-LINK',
|
||||
name: 'ExternalLink',
|
||||
path: '/external-link',
|
||||
component: Layout,
|
||||
meta: {
|
||||
@ -131,7 +131,7 @@ export const basicRoutes = [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'LINK-GITHUB-SRC',
|
||||
name: 'LinkGithubSrc',
|
||||
path: 'https://github.com/zclzone/vue-naive-admin',
|
||||
meta: {
|
||||
title: '源码 - github',
|
||||
@ -139,7 +139,7 @@ export const basicRoutes = [
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'LINK-GITEE-SRC',
|
||||
name: 'LinkGiteeSrc',
|
||||
path: 'https://gitee.com/zclzone/vue-naive-admin',
|
||||
meta: {
|
||||
title: '源码 - gitee',
|
||||
@ -147,7 +147,7 @@ export const basicRoutes = [
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'LINK-DOCS',
|
||||
name: 'LinkDocs',
|
||||
path: 'https://zclzone.github.io/vue-naive-admin-docs',
|
||||
meta: {
|
||||
title: '文档 - vuepress',
|
||||
@ -159,7 +159,7 @@ export const basicRoutes = [
|
||||
]
|
||||
|
||||
export const NOT_FOUND_ROUTE = {
|
||||
name: 'NOT_FOUND',
|
||||
name: 'NotFound',
|
||||
path: '/:pathMatch(.*)*',
|
||||
redirect: '/404',
|
||||
isHidden: true,
|
||||
|
@ -2,7 +2,7 @@ import Layout from '@/layout/index.vue'
|
||||
|
||||
export default [
|
||||
{
|
||||
name: 'EXAMPLE',
|
||||
name: 'Example',
|
||||
path: '/example',
|
||||
component: Layout,
|
||||
redirect: '/example/table',
|
||||
@ -12,7 +12,7 @@ export default [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'EXAMPLE-TABLE',
|
||||
name: 'Table',
|
||||
path: 'table',
|
||||
component: () => import('@/views/examples/table/index.vue'),
|
||||
redirect: '/example/table/post',
|
||||
@ -22,7 +22,7 @@ export default [
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: 'POST-LIST',
|
||||
name: 'PostList',
|
||||
path: 'post',
|
||||
component: () => import('@/views/examples/table/post/index.vue'),
|
||||
meta: {
|
||||
@ -31,7 +31,7 @@ export default [
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'POST-CREATE',
|
||||
name: 'PostCreate',
|
||||
path: 'post-create',
|
||||
component: () => import('@/views/examples/table/post/post-create.vue'),
|
||||
meta: {
|
||||
|
@ -5,7 +5,7 @@
|
||||
</template>
|
||||
|
||||
<!--使用keep-alive须设置name,注意请与对应的路由的name保持一致,方便统一处理-->
|
||||
<script setup name="TEST-KEEP-ALIVE">
|
||||
<script setup name="TestKeepAlive">
|
||||
import { onMounted, onActivated, onDeactivated } from 'vue'
|
||||
|
||||
onMounted(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user