19、vue中常用的监听事件watch:
检测数据中 suanziParamterType 的值发生变化后,进行另外的属性赋值操作
data:(){
return{
suanziParamterType:'',
}
},
watch:{
suanziParamterType(value,oldValue){
if (value == 'leftJoin'){
this.suanziForm.connectionType = 'left join'
}else if (value == 'rightJoin'){
this.suanziForm.connectionType = 'right join'
}else if (value == 'innerJoin'){
this.suanziForm.connectionType = 'inner join'
}
}
},