fix table 初始化触发修改选中key事件

This commit is contained in:
Theluyuan 2023-05-17 14:29:32 +08:00
parent 70b082a208
commit 89a638b782
4 changed files with 10 additions and 4 deletions

View File

@ -1102,7 +1102,9 @@ const _sfc_main = defineComponent({
} else {
hasChecked.value = false;
}
emit("update:selectedKeys", tableSelectedKeys.value);
if (tableSelectedKeys.value != props.selectedKeys) {
emit("update:selectedKeys", tableSelectedKeys.value);
}
}, { deep: true, immediate: true });
watch(tableExpandKeys, () => {
emit("update:expandKeys", tableExpandKeys.value);

View File

@ -19536,7 +19536,9 @@ const _sfc_main$D = defineComponent({
} else {
hasChecked.value = false;
}
emit("update:selectedKeys", tableSelectedKeys.value);
if (tableSelectedKeys.value != props.selectedKeys) {
emit("update:selectedKeys", tableSelectedKeys.value);
}
}, { deep: true, immediate: true });
watch(tableExpandKeys, () => {
emit("update:expandKeys", tableExpandKeys.value);

View File

@ -313,7 +313,9 @@ watch(
} else {
hasChecked.value = false;
}
emit("update:selectedKeys", tableSelectedKeys.value);
if(tableSelectedKeys.value != props.selectedKeys){
emit("update:selectedKeys", tableSelectedKeys.value);
}
},
{ deep: true, immediate: true }
);

File diff suppressed because one or more lines are too long