HTML的标题组件~~
1.安装插件
cnpm install vue-wechat-title --save
2.在main.js中引入
Vue.use(require('vue-wechat-title'))
3.在路由里添加title属性例:
{
path: '/',
component: Index,
meta: {
title: '首页'
}
4.在app.vue中修改router-view,加入他的这个组件
<div id="app" >
<router-view v-wechat-title="$route.meta.title"> </router-view>
</div>
扫描二维码关注公众号,回复:
4345945 查看本文章