jshare

好东东,没个标题看着多难受

看到1文章  http://blog.csdn.net/qishuixian/article/details/72912368

推荐使用 vue-wechat-title插件

npm install vue-wechat-title --save  下

看后我的使用方式

1. 在 main.js 中

 

import VueWechatTitle from \'vue-wechat-title\';  
Vue.use(VueWechatTitle)

 

这样就能用了

2. 路由中加下 title

{
      path: \'/Login\',
      /* *  按需加载   */
      component: (resolve) => {
        require([\'@/components/Login.vue\'], resolve)
      },
      meta: {
        title: \'登录\'
      }
    },

3.  在app.vue 中修改 router-view ,加入他的这个组件

<router-view v-wechat-title="$route.meta.title"></router-view> 

--------------

正常的话,你再访问就能看到自己写的标题了

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案