官方商务添加
This commit is contained in:
+4
-1
@@ -21,7 +21,10 @@ const router = new VueRouter({
|
||||
routes
|
||||
});
|
||||
router.beforeEach((to, from, next) => {
|
||||
document.title = to.meta.title;
|
||||
// 路由未配置标题时保留 index.html 里的标题,避免被清空后标签页只显示网址
|
||||
if (to.meta.title) {
|
||||
document.title = to.meta.title;
|
||||
}
|
||||
next();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user