computed:{ lists:function(){ return this.$store.getters.isShow.list }, }
watch:{
index:{
handler(index){
console.log(index)
}
}
}
不得不说这个真的很好用hhh
使用computed和watch实现子组件监听父组件的变量变化
原文:https://www.cnblogs.com/fdd-111/p/11839892.html