Skip to content

Commit

Permalink
fix(menu): menu的激活菜单项未发生变化时也会触发change (#2693)
Browse files Browse the repository at this point in the history
fix #2688
  • Loading branch information
dexterBo authored Aug 15, 2023
1 parent 87ea127 commit 539247e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/menu/menu-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ export default defineComponent({
const handleClick = (e: MouseEvent) => {
e.stopPropagation();
if (props.disabled) return;
menu.select(props.value);
if (menu.activeValue.value !== props.value) {
menu.select(props.value);
}
ctx.emit('click', { e, value: props.value });
props.onClick?.({ e, value: props.value });

Expand Down

0 comments on commit 539247e

Please sign in to comment.