vue cli2.0单页面title修改方法

一、npm install vue-wechat-title --save  执行命令

二、在main.js中添加   

 Vue.use(VueWechatTitle);
    Vue.config.productionTip= false

三、在router/index.js文件中添加  

routes: [{ path: \'/\',redirect: \'Home\' },{ path: \'/Home\',name: \'Home\',component: Home,
  meta:{
   title:\'银行开户\'
  }},],

四、在app.vue 中修改 router-view  修改为:<router-view v-wechat-title=\"$router.meta.title\">

以上所述是小编给大家介绍的vue cli2.0单页面title修改方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对网站的支持!

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容