diff --git a/components/dropdown/dropdown.tsx b/components/dropdown/dropdown.tsx index 5424150b9..143ed3d31 100644 --- a/components/dropdown/dropdown.tsx +++ b/components/dropdown/dropdown.tsx @@ -92,7 +92,7 @@ const Dropdown = defineComponent({ class: classNames(child?.props?.class, `${prefixCls}-trigger`), disabled, }); - const triggerActions = disabled ? [] : trigger; + const triggerActions = disabled ? [] : typeof trigger === 'string' ? [trigger] : trigger; let alignPoint; if (triggerActions && triggerActions.indexOf('contextmenu') !== -1) { alignPoint = true; diff --git a/components/vc-dropdown/src/Dropdown.jsx b/components/vc-dropdown/src/Dropdown.jsx index 318b67032..b80da0eeb 100644 --- a/components/vc-dropdown/src/Dropdown.jsx +++ b/components/vc-dropdown/src/Dropdown.jsx @@ -29,8 +29,8 @@ export default defineComponent({ 'hover', ), alignPoint: PropTypes.looseBool, - showAction: PropTypes.array.def([]), - hideAction: PropTypes.array.def([]), + showAction: PropTypes.array, + hideAction: PropTypes.array, getPopupContainer: PropTypes.func, visible: PropTypes.looseBool, defaultVisible: PropTypes.looseBool.def(false), @@ -177,7 +177,6 @@ export default defineComponent({ if (!triggerHideAction && trigger.indexOf('contextmenu') !== -1) { triggerHideAction = ['click']; } - const triggerProps = { ...otherProps, prefixCls,