vue-cli title 里面怎动态显示文字

在路由里每个都添加一个meta
[{ path:'/login', meta: { title: '登录页面' }, component:'login' }]
 
main.js里面加如下代码:
   router.beforeEach((to, from, next) => {
      window.document.title = to.meta.title;
      next()
  });
原文地址:https://www.cnblogs.com/peachmeimei/p/7880662.html