Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: 调整菜单面板打开关闭事件的逻辑(#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinmao88 committed Oct 30, 2023
1 parent 00b57c7 commit 66c8e97
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/layouts/src/components/mixSideBar/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ const getItemEvents = (item) => {
function closeMenu() {
if (!unref(getIsFixed)) {
openMenu.value = false
setActive(false)
}
}
Expand Down Expand Up @@ -167,10 +168,14 @@ const getMenuEvents = computed(() => {
return !unref(getMixSideFixed)
? {
onMouseleave: () => {
setActive(true)
// 鼠标移出菜单不做操作
// if (!openMenu.value) {
// setActive(true)
// }
//鼠标离开Menu 不触发关闭菜单面板
// closeMenu()
},
onMouseenter: () => {},
}
: {}
})
Expand All @@ -183,14 +188,14 @@ const handleFixedMenu = () => {
</script>

<template>
<div :class="bem()" v-bind="getMenuEvents">
<div :class="bem()">
<logo
:class="[bem('logo'), 'shadow']"
:style="{ '--un-shadow-color': 'var(--n-border-color)' }"
v-if="getMenuType === NavBarModeEnum.MIX_SIDEBAR"
:showTitle="false"
/>
<VbenScrollbar :class="bem('scrollbar')">
<VbenScrollbar :class="bem('scrollbar')" v-bind="getMenuEvents">
<ul :class="bem('module')">
<li
:class="[
Expand Down

0 comments on commit 66c8e97

Please sign in to comment.