|
在router/index.js写路由的js中添加一段代码:
router.beforeEach((to, from, next) => {
const { title } = to.meta
if (title) {
document.title = `标题 | ${title}`
}
next()
})
export default router
不要在该奋斗的年纪选择去偷懒,只有度过一段连自己都被感动了的日子,才会变成那个最好的自己.
来源:https://www.cnblogs.com/kpengfang/p/14105108.html |