Skip to content

Commit

Permalink
fix: dropdown click close for contextmenu vueComponent#4198
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Jun 11, 2021
1 parent ce6f44f commit 0cf37b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/dropdown/dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 2 additions & 3 deletions components/vc-dropdown/src/Dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -177,7 +177,6 @@ export default defineComponent({
if (!triggerHideAction && trigger.indexOf('contextmenu') !== -1) {
triggerHideAction = ['click'];
}

const triggerProps = {
...otherProps,
prefixCls,
Expand Down

0 comments on commit 0cf37b3

Please sign in to comment.