up
chenyc
2022-09-23 0799c1ee73c6aa006ef6e0991b67d54576a3a5b0
src/router/index.ts
@@ -4,7 +4,9 @@
import { cancelRequest } from '@/utils/axios'
const routes: Array<RouteRecordRaw> = [
    { path: '/', name: 'Home', component: () => import('views/home/index.vue')},
    { path: '/', name: 'Home', component: () => import('views/home/index.vue'),meta:{title:'首页'}},
    { path: '/my', name: 'myMine', component: () => import('views/myMine/index.vue'),meta:{title:'我的'}},
    { path: '/paiban', name: 'paiban', component: () => import('views/paiban/index.vue'),meta:{title:'透析排班'}},
    { path: '/test', name: 'Test', component: () => import('views/test.vue')}
]
@@ -15,6 +17,9 @@
router.beforeEach((to, from, next) => {
    cancelRequest()
    if (to.meta.title){
        document.title = to.meta.title
    }
    next()
})