the effect I want to achieve is to click on the left navigation and open the right tab. I maintain a piece of data here. If I click repeatedly, I will remove the repetition and solve it.
is how to repeat. Do not show
what you click repeatedly.
export default {
name: "index",
data:function(){
return {
msg:"hi",
mainNav:[],
navArr:[]
}
},
mounted:function(){
if(this.mainNav == ""){
this.$router.push("/mean/home");
}
// console.log(this.navArr);
},
methods:{
showNav:function(name){
this.navArr.push(name);
this.mainNav = this.navArr;
}
},
components:{
leftBar,
top,
meanBody
}
};