14.vue返回上级页面按钮
作者:
崩鲨卡拉卡 | 来源:发表于
2019-04-10 17:28 被阅读0次 <mt-header fixed title="洲峰电子">
<span slot="left" class="back" style="font-size:1em" @click="back" v-show="flag" >
<mt-button icon="back">返回</mt-button>
</span>
</mt-header>
export default {
data() {
return {
flag:false
};
},
watch: {
"$route.path":function(newVal){
//监听页面的路径 在home 页面下 ,隐藏返回按钮
if(newVal==='/home'){
this.flag=false
}else{
this.flag=true;
}
}
},
components: {}
};
本文标题:14.vue返回上级页面按钮
本文链接:https://www.haomeiwen.com/subject/peeoiqtx.html
网友评论