data() {
return {
cur: 1,
defaultProps: {
label: "name",
children: "children",
template: "isok",
},
}
},
watch:{
cur:{
handler(newValue, oldValue){
console.log(newValue);
if (newValue === 3) {
this.defaultProps.label= "deptName"
}else{
this.defaultProps.label= "name"
}
},
}
},
watch监听
最新推荐文章于 2024-06-02 21:27:33 发布