Skip to content

Commit dd063b8

Browse files
authored
fix(dropdown): open invalid (#6316)
1 parent 9c6a9fb commit dd063b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

components/dropdown/dropdown.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ const Dropdown = defineComponent({
139139
return placement;
140140
});
141141

142+
const mergedVisible = computed(() => {
143+
return typeof props.visible === 'boolean' ? props.visible : props.open;
144+
});
145+
142146
const handleVisibleChange = (val: boolean) => {
143147
emit('update:visible', val);
144148
emit('visibleChange', val);
@@ -183,6 +187,7 @@ const Dropdown = defineComponent({
183187
{
184188
...props,
185189
...attrs,
190+
visible: mergedVisible.value,
186191
builtinPlacements,
187192
overlayClassName: overlayClassNameCustomized,
188193
arrow: !!arrow,

0 commit comments

Comments
 (0)