1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- import Vue from 'vue'
- import VueRouter from 'vue-router'
- Vue.use(VueRouter)
- const routes = [{
- path: '/',
- name: '主页',
- component: () =>
- import ('@/views/home.vue')
- },
- {
- path: '/hours',
- name: '我的家',
- component: () =>
- import ('@/views/hours/hours.vue')
- },
- {
- path: '/food',
- name: '菜场',
- component: () =>
- import ('@/views/food/food.vue'),
- },
- {
- path: '/report/list',
- name: '日报列表',
- component: () =>
- import ('@/views/report/reportList/reportList.vue')
- },
- {
- path: '/report/detail/:id(\\d+)?', //+多位
- name: '日报的详情与修改',
- component: () =>
- import ('@/views/report/reportDetail/reportDetail.vue')
- },
- // {
- // path: '/report',
- // name: '日报',
- // redirect: '/report/list',
- // children: [{
- // path: 'list',
- // name: '列表',
- // component: () =>
- // import ('@/views/report/reportList/reportList.vue')
- // },
- // {
- // path: 'detail/:id(\\d+)?',
- // name: '详情与修改',
- // component: () =>
- // import ('@/views/report/reportDetail/reportDetail.vue')
- // }
- // ]
- // }
- ]
- const router = new VueRouter({
- mode: 'history',
- base: process.env.BASE_URL,
- routes
- })
- export default router
|