tangjunhao преди 1 седмица
родител
ревизия
0ccce1c98a
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      src/router/index.js

+ 1 - 1
src/router/index.js

@@ -63,7 +63,7 @@ router.beforeEach((to, from, next) => {
     next({ name: 'login' });
   }
   else {
-    document.title = to.name || '默认标题';
+    document.title = to.meta.title || '默认标题';
     next();
   }
 });