vue vue-router 跳转页面,隐藏主路由
vue-router 跳转页面时,主路由还显示,解决方法主要问题是你把路由引入成了公共底部{path:'/home',name:'home',component:home},将其改成{path:'/home',name:'home',component:home,meta:{index:0,showFooter:true}}然后在app...
·
vue-router 跳转页面时,主路由还显示,解决方法
主要问题是你把路由引入成了公共底部
{
path:'/home',
name:'home',
component:home
},
将其改成
{
path:'/home',
name:'home',
component:home,
meta:{
index:0,
showFooter:true
}
}
然后在app.vue里加上 v-show="$route.meta.showFooter"
<router v-show="$route.meta.showFooter"></router>
二级页面,也就是将要跳转到的页面
{
path:'/phonevalidation',
name:'phonevalidation',
component:phonevalidation,
meta:{
index:1,
showFooter:false
}
}
就大功告成啦
更多推荐
已为社区贡献1条内容
所有评论(0)