From b4c29d927b9a9cc9e9f5ef2b79c69a79213c7db3 Mon Sep 17 00:00:00 2001 From: selicens <1244620067@qq.com> Date: Tue, 17 Oct 2023 22:59:42 +0800 Subject: [PATCH] fix: dropdownVisibleChange invalid (#7033) Co-authored-by: undefined --- components/vc-select/BaseSelect.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/vc-select/BaseSelect.tsx b/components/vc-select/BaseSelect.tsx index b264455a05..63828473b4 100644 --- a/components/vc-select/BaseSelect.tsx +++ b/components/vc-select/BaseSelect.tsx @@ -341,11 +341,9 @@ export default defineComponent({ const onToggleOpen = (newOpen?: boolean) => { const nextOpen = newOpen !== undefined ? newOpen : !mergedOpen.value; - if (!props.disabled) { + if (mergedOpen.value !== nextOpen && !props.disabled) { setInnerOpen(nextOpen); - if (mergedOpen.value !== nextOpen) { - props.onDropdownVisibleChange && props.onDropdownVisibleChange(nextOpen); - } + props.onDropdownVisibleChange && props.onDropdownVisibleChange(nextOpen); } };