fix: fix the bug of the play view

This commit is contained in:
Rogee
2024-12-13 11:34:09 +08:00
parent 1f8371b878
commit 7c52823610
5 changed files with 23 additions and 6 deletions

View File

@@ -16,11 +16,17 @@ const router = createRouter({
path: '',
name: 'tab.home',
component: HomeView,
meta: {
title: '首页',
}
},
{
path: 'bought',
name: 'tab.bought',
component: () => import('../views/tabs/BoughtView.vue'),
meta: {
title: '已购买',
}
},
{
path: 'user',
@@ -29,6 +35,9 @@ const router = createRouter({
// this generates a separate chunk (About.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import('../views/tabs/UserView.vue'),
meta: {
title: '个人中心',
}
},
]
},
@@ -36,6 +45,9 @@ const router = createRouter({
path: '/t/:tenant/play/:hash',
name: 'play',
component: () => import('../views/PlayView.vue'),
meta: {
title: '播放',
}
},
],
})
@@ -55,4 +67,8 @@ router.beforeEach((to, from, next) => {
// }
})
router.afterEach((to, from) => {
document.title = to.meta.title || ''
})
export default router