watch: {
isShow: function(newVal) {
if (newVal && this.currOperation == 2) {
console.log(this.selectArr[0],"22222222222222")
this.addForm.tenantName = this.selectArr[0].group_name;
// 下拉框多条显示回显转为数组再转为数值型数组
this.addForm.selectUser = this.selectArr[0].roleIds!=null?this.selectArr[0].roleIds.split(",").map(Number):"";
this.addForm.selectSubsystem =this.selectArr[0].macGIds!=null?this.selectArr[0].macGIds.split(",").map(Number):"";
this.addForm.role = this.selectArr[0].roles !=null? true : false;
this.addForm.subsystem = this.selectArr[0].macGIds !=null? true : false;
}
}
}
vue watch监听修改值变化
于 2023-06-17 22:06:50 首次发布