🐛(component): [dropdown]修复使用面板默认渲染节点时, dropdownSubMenu 多级菜单异常关闭的问题

This commit is contained in:
sight 2022-07-04 23:30:31 +08:00
parent b9815b625b
commit 1753c9e04c
2 changed files with 7 additions and 0 deletions

View File

@ -455,6 +455,9 @@ const handleMouseEnter = (e: MouseEvent) => {
};
const handleMouseEnterWithContext = (e: MouseEvent) => {
if (!props.popupContainer){
return;
}
dropdownCtx?.onMouseenter(e);
handleMouseEnter(e);
};
@ -467,6 +470,9 @@ const handleMouseLeave = (e: MouseEvent) => {
};
const handleMouseLeaveWithContext = (e: MouseEvent) => {
if (!props.popupContainer) {
return;
}
dropdownCtx?.onMouseleave(e);
handleMouseLeave(e);
};

View File

@ -35,6 +35,7 @@ const props = withDefaults(defineProps<LayDropdownProps>(), {
:placement="placement"
:auto-fit-min-width="false"
:contentOffset="contentOffset"
:disabled="disabled"
>
<lay-dropdown-menu-item>
<template v-if="$slots.prefix" #prefix>