fix: dropdownVisibleChange invalid (#7033)

Co-authored-by: undefined <undefined>
pull/7039/head
selicens 2023-10-17 22:59:42 +08:00 committed by GitHub
parent bf917f36eb
commit b4c29d927b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -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);
}
};