Skip to content

Commit

Permalink
fix(mouse-menu): subMenu position error at first time
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-kfd committed Sep 2, 2024
1 parent 2c8cc02 commit 6124f31
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/mouse-menu/mouse-menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,10 @@ export default defineComponent({
}
showMenu.value = false;
};
const handleMenuMouseEnter = ($event: MouseEvent, item: MenuSetting) => {
const handleMenuMouseEnter = async ($event: MouseEvent, item: MenuSetting) => {
if (item.children && !item.disabled) {
hoverFlag.value = true;
await nextTick()
const el = $event.currentTarget as HTMLElement;
if (!el) return;
const { offsetWidth } = el;
Expand Down

0 comments on commit 6124f31

Please sign in to comment.