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