H5单页面应用设置标题——vue-wechat-title

安装
npm install vue-wechat-title --save-dev;
main.js引入
Vue.use(require('vue-wechat-title'));
App.vue中

router.js配置
export default new Router({
    routes: [
        {
            path: '/',
            name: 'main',
            component: main,
            children:[
                {
                    path: '/',
                    name: 'home',
                    component: home,
                    meta: {
                        title: '首页'
                    }
                }
            ]
        }
    ]
})

你可能感兴趣的:(H5单页面应用设置标题——vue-wechat-title)