首页
mac
it
登录
6mi
u
盘
搜
搜 索
it
导航路由title标题
导航路由title标题
mac
2024-03-12
30
1、在入口项目main.js中引入全局路由导航
//路由导航 router.beforeEach((to, from, next) =>
{
/* 路由发生变化修改页面title */
if (to.meta.title)
{
document.title = to.meta.title
}
next
(
)
}
)
2、在我们的router路由文件夹里的index.js配置路由后面跟上meta标签title 这样就可以了
转载请注明原文地址: https://mac.8miu.com/read-485939.html
最新回复
(
0
)