diff --git a/components/dropdown/dropdown.tsx b/components/dropdown/dropdown.tsx index 5e0b463b9..1fc02a71e 100644 --- a/components/dropdown/dropdown.tsx +++ b/components/dropdown/dropdown.tsx @@ -139,6 +139,10 @@ const Dropdown = defineComponent({ return placement; }); + const mergedVisible = computed(() => { + return typeof props.visible === 'boolean' ? props.visible : props.open; + }); + const handleVisibleChange = (val: boolean) => { emit('update:visible', val); emit('visibleChange', val); @@ -183,6 +187,7 @@ const Dropdown = defineComponent({ { ...props, ...attrs, + visible: mergedVisible.value, builtinPlacements, overlayClassName: overlayClassNameCustomized, arrow: !!arrow,