mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-27 03:01:14 +08:00
fix(tree): fix every node @check-change event fire only once (#1390)
* fix(tree): fix every node @check-change event fire only once fix every node @check-change event fire only once (修复每个node节点@check-change事件仅触发一次问题) * fix(tree): fix node trigger check-change only once Co-authored-by: 田梦圆 <tianmengyuan@tianmengyuan-2.local> Co-authored-by: Ryan2128 <33176053+Ryan2128@users.noreply.github.com>
This commit is contained in:
parent
df5d2ac97a
commit
aef2d8cc9e
@ -160,7 +160,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
const handleSelectChange = (checked: boolean, indeterminate: boolean) => {
|
||||
if (oldChecked.value !== checked && oldIndeterminate.value !== indeterminate) {
|
||||
if (oldChecked.value !== checked || oldIndeterminate.value !== indeterminate) {
|
||||
tree.ctx.emit('check-change', props.node.data, checked, indeterminate)
|
||||
}
|
||||
oldChecked.value = checked
|
||||
|
Loading…
Reference in New Issue
Block a user