第一步:在根目录中的index.html中添加代码:
<title>候鸟供应链</title>
第二步:安装插件
npm install vue-wechat-title
第三步:在main.js 中添加
import VueWechatTitle from 'vue-wechat-title'; Vue.use(VueWechatTitle)
第四步:在,路由中添加:
meta: { title: '登录' }
第五步:在app.vue 中修改 router-view ,加入这个组件
<router-view v-wechat-title="$route.meta.title"></router-view>