ZaiZai 2 lat temu
rodzic
commit
2933739102
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      src/router/index.js

+ 3 - 3
src/router/index.js

@@ -57,11 +57,11 @@ router.beforeResolve(async (to) => {
 
 router.afterEach((to) => {
     //根据当前跳转的路由设置显示在浏览器标签的title
-    let pageTitle = to.meta['title'], title = config.title;
+    let pageTitle = to.meta['title'];
     if (to.path !== "/") {
-        window.document.title =  pageTitle?`${pageTitle} - ${title}`:title;
+        window.document.title =  pageTitle ? pageTitle : '';
     } else {
-        window.document.title = title;
+        window.document.title = '';
     }
     window.scrollTo(0, 0)
     NProgress.done();