vue cli2.0單頁面title修改方法
來源:懂視網
責編:小采
時間:2020-11-27 22:13:05
vue cli2.0單頁面title修改方法
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:
導讀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:

一、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修改方法,希望對大家有所幫助,如果大家有任何疑問請給我留言,小編會及時回復大家的。在此也非常感謝大家對腳本之家網站的支持!
聲明:本網頁內容旨在傳播知識,若有侵權等問題請及時與本網聯系,我們將在第一時間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
vue cli2.0單頁面title修改方法
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: