1.在router.js文件中设置 routes: [] 添假meta属性 自定义当前试图的title
{
path: '/login',
component: Login,
meta: { title: '登录系统' }
}
2.在router.js文件中设置 路由导航守卫中
router.beforeEach((to, from, next) => {
if (to.meta.title) {
document.title = to.meta.title
}
next()
})