https://antdv.com/components/...
当悬停在首页位置展开菜单后,在选择下面子菜单时,会偶尔出现选不中,菜单自动收起的情况
<template>
<a-layout>
<a-layout-header
:style="{
position: 'fixed',
zIndex: 1,
width: '100%',
background: 'rgb(255 255 255)',
}"
>
<div class="logo">
信息统计系统
<span style="font-size: 15px; color: #b0c4de; padding-left: 10px">
数字化应用项目</span
>
</div>
<a-menu
v-model:selectedKeys="current"
mode="horizontal"
theme="light"
style="float: right"
>
<a-sub-menu key="mail">
<template #icon>
<mail-outlined />
</template>
<template #title>首页</template>
<a-menu-item key="personInfo">
<router-link :to="{ path: '/ryinfo/' + zyq }">
人员情况
</router-link>
</a-menu-item>
<a-menu-item key="wrInfo"
><router-link :to="{ path: /wrinfo/ + zyq }"
>污染情况</router-link
></a-menu-item
>
<a-menu-item key="syInfo"
><router-link :to="{ path: /syinfo/ + zyq }"
>水淹情况</router-link
></a-menu-item
>
</a-sub-menu>
<a-sub-menu key="app">
<template #icon>
<appstore-outlined />
</template>
</a-menu>
</a-layout-header>
<a-layout-content
:style="{
background: '#fff',
marginTop: '65px',
minHeight: 'calc(100vh - 110px)',
}"
>
<router-view :key="key" />
</a-layout-content>
<a-layout-footer
:style="{
textAlign: 'center',
fontSize: '15px',
padding: '10px 50px',
height: '45px',
}"
>
如有bug或意见,请联系
</a-layout-footer>
</a-layout>
</template>
有没有一种可能是你点到子菜单和主菜单之间的空隙里面去了?