Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
你点击跳转到另一个画面的时候之前选中的的会取消
@核桃酥 并不会啊,你看我现在的两个菜单都是选中状态
你在菜单组件的css脚本中加上这个看一下.ant-menu-horizontal:not(.ant-menu-dark) > .ant-menu-item-selected::after { border-bottom: none !important; }
@核桃酥 加了这个会导致没有菜单能有被选中的样式
在两个菜单组件配置事件我框起来的需要改成你实际菜单对应的编号 const menu2 = document.querySelector('.FrontMenu_290B5D67 ul'); const selected = menu2.querySelector('.ant-menu-item-selected'); if (selected) { selected.classList.remove('ant-menu-item-selected'); }