fix: dropdown click close for contextmenu #4198
parent
ce6f44f918
commit
0cf37b3f8e
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue