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`),
|
class: classNames(child?.props?.class, `${prefixCls}-trigger`),
|
||||||
disabled,
|
disabled,
|
||||||
});
|
});
|
||||||
const triggerActions = disabled ? [] : trigger;
|
const triggerActions = disabled ? [] : typeof trigger === 'string' ? [trigger] : trigger;
|
||||||
let alignPoint;
|
let alignPoint;
|
||||||
if (triggerActions && triggerActions.indexOf('contextmenu') !== -1) {
|
if (triggerActions && triggerActions.indexOf('contextmenu') !== -1) {
|
||||||
alignPoint = true;
|
alignPoint = true;
|
||||||
|
|
|
@ -29,8 +29,8 @@ export default defineComponent({
|
||||||
'hover',
|
'hover',
|
||||||
),
|
),
|
||||||
alignPoint: PropTypes.looseBool,
|
alignPoint: PropTypes.looseBool,
|
||||||
showAction: PropTypes.array.def([]),
|
showAction: PropTypes.array,
|
||||||
hideAction: PropTypes.array.def([]),
|
hideAction: PropTypes.array,
|
||||||
getPopupContainer: PropTypes.func,
|
getPopupContainer: PropTypes.func,
|
||||||
visible: PropTypes.looseBool,
|
visible: PropTypes.looseBool,
|
||||||
defaultVisible: PropTypes.looseBool.def(false),
|
defaultVisible: PropTypes.looseBool.def(false),
|
||||||
|
@ -177,7 +177,6 @@ export default defineComponent({
|
||||||
if (!triggerHideAction && trigger.indexOf('contextmenu') !== -1) {
|
if (!triggerHideAction && trigger.indexOf('contextmenu') !== -1) {
|
||||||
triggerHideAction = ['click'];
|
triggerHideAction = ['click'];
|
||||||
}
|
}
|
||||||
|
|
||||||
const triggerProps = {
|
const triggerProps = {
|
||||||
...otherProps,
|
...otherProps,
|
||||||
prefixCls,
|
prefixCls,
|
||||||
|
|
Loading…
Reference in New Issue