单选人员控件选择后覆盖

This commit is contained in:
范强强
2023-04-10 10:05:46 +08:00
parent 50b6ae1bc1
commit 810c55b592
2 changed files with 11 additions and 0 deletions
@@ -303,6 +303,11 @@
onCheck(checkedKeys, info) {
this.userIds = checkedKeys.checked
if (this.isSingleChoice) {
if (this.userIds.length > 1) {
this.userIds.shift()
}
}
this.userName = []
if (this.userIds.length > 0) {
for (let i = 0; i < this.userIds.length; i++) {
@@ -168,6 +168,12 @@
this.userName.push(res.data.props.dataRef.title)
})
}
if (this.isSingleChoice) {
if (this.userIds.length > 1) {
this.userIds.shift()
this.userName.shift()
}
}
}
}
}