Commit bbb8f250 by wusiyi

fix: 优化菜单组件

parent 09b9724c
......@@ -74,8 +74,9 @@ export default {
},
methods: {
handleMenuClick(item) {
// 如果菜单项有子节点,不关闭菜单(由组件内部处理展开/收起)
// 如果菜单项有子节点,切换展开/收起状态
if (item.children && item.children.length > 0) {
this.$set(item, 'expanding', !item.expanding)
return
}
// 叶子节点点击后关闭菜单
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment