-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
对菜单做分类,改为二级菜单;路由也改二级;添加openKeys保持菜单展开状态;修改vue文件的位置
- Loading branch information
Showing
6 changed files
with
124 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,84 +1,95 @@ | ||
import { createRouter, createWebHistory } from 'vue-router' | ||
import {createRouter, createWebHistory} from 'vue-router' | ||
|
||
const routes = [{ | ||
path: '/', | ||
component: () => import('../views/main.vue'), | ||
children: [{ | ||
path: 'welcome', | ||
component: () => import('../views/main/welcome.vue'), | ||
}, { | ||
path: 'about', | ||
component: () => import('../views/main/about.vue'), | ||
}, { | ||
path: 'station', | ||
component: () => import('../views/main/station.vue'), | ||
path: '/', | ||
component: () => import('../views/main.vue'), | ||
children: [{ | ||
path: 'welcome', | ||
component: () => import('../views/main/welcome.vue'), | ||
}, { | ||
path: 'about', | ||
component: () => import('../views/main/about.vue'), | ||
}, { | ||
path: 'base', | ||
children: [ | ||
{ | ||
path: 'station', | ||
component: () => import('../views/main/base/station.vue'), | ||
|
||
}, { | ||
path: 'train', | ||
component: () => import('../views/main/train.vue'), | ||
}, { | ||
path: 'train', | ||
component: () => import('../views/main/base/train.vue'), | ||
|
||
}, { | ||
path: 'train-station', | ||
component: () => import('../views/main/train-station.vue'), | ||
}, { | ||
path: 'train-station', | ||
component: () => import('../views/main/base/train-station.vue'), | ||
|
||
},{ | ||
path: 'batch/job', | ||
name: 'batch/job', | ||
component: () => import('../views/main/job.vue'), | ||
}, | ||
] | ||
}, | ||
|
||
}, | ||
// | ||
// { | ||
// path: 'business/', | ||
// children: [{ | ||
// path: 'sk-token', | ||
// component: () => import('../views/main/business/sk-token.vue'), | ||
// }, { | ||
// path: 'confirm-order', | ||
// component: () => import('../views/main/business/confirm-order.vue'), | ||
// }, { | ||
// path: 'daily-train', | ||
// component: () => import('../views/main/business/daily-train.vue'), | ||
// }, { | ||
// path: 'daily-train-station', | ||
// component: () => import('../views/main/business/daily-train-station.vue'), | ||
// }, { | ||
// path: 'daily-train-carriage', | ||
// component: () => import('../views/main/business/daily-train-carriage.vue'), | ||
// }, { | ||
// path: 'daily-train-seat', | ||
// component: () => import('../views/main/business/daily-train-seat.vue'), | ||
// }, { | ||
// path: 'daily-train-ticket', | ||
// component: () => import('../views/main/business/daily-train-ticket.vue'), | ||
// }] | ||
// }, | ||
// | ||
// { | ||
// path: 'batch/', | ||
// children: [{ | ||
// path: 'job', | ||
// component: () => import('../views/main/batch/job.vue') | ||
// }] | ||
// }, | ||
// | ||
// { | ||
// path: 'member/', | ||
// children: [{ | ||
// path: 'ticket', | ||
// component: () => import('../views/main/member/ticket.vue') | ||
// }] | ||
// } | ||
{ | ||
path: "batch/", | ||
children: [ | ||
{ | ||
path: 'job', | ||
component: () => import('../views/main/batch/job.vue'), | ||
} | ||
] | ||
}, | ||
|
||
] | ||
// | ||
// { | ||
// path: 'business/', | ||
// children: [{ | ||
// path: 'sk-token', | ||
// component: () => import('../views/main/business/sk-token.vue'), | ||
// }, { | ||
// path: 'confirm-order', | ||
// component: () => import('../views/main/business/confirm-order.vue'), | ||
// }, { | ||
// path: 'daily-train', | ||
// component: () => import('../views/main/business/daily-train.vue'), | ||
// }, { | ||
// path: 'daily-train-station', | ||
// component: () => import('../views/main/business/daily-train-station.vue'), | ||
// }, { | ||
// path: 'daily-train-carriage', | ||
// component: () => import('../views/main/business/daily-train-carriage.vue'), | ||
// }, { | ||
// path: 'daily-train-seat', | ||
// component: () => import('../views/main/business/daily-train-seat.vue'), | ||
// }, { | ||
// path: 'daily-train-ticket', | ||
// component: () => import('../views/main/business/daily-train-ticket.vue'), | ||
// }] | ||
// }, | ||
// | ||
// { | ||
// path: 'batch/', | ||
// children: [{ | ||
// path: 'job', | ||
// component: () => import('../views/main/batch/job.vue') | ||
// }] | ||
// }, | ||
// | ||
// { | ||
// path: 'member/', | ||
// children: [{ | ||
// path: 'ticket', | ||
// component: () => import('../views/main/member/ticket.vue') | ||
// }] | ||
// } | ||
|
||
] | ||
}, { | ||
path: '', | ||
redirect: '/welcome' | ||
path: '', | ||
redirect: '/welcome' | ||
}]; | ||
|
||
const router = createRouter({ | ||
history: createWebHistory(process.env.BASE_URL), | ||
routes | ||
history: createWebHistory(process.env.BASE_URL), | ||
routes | ||
}) | ||
|
||
export default router |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.