补充修改

This commit is contained in:
LiJinHui
2025-10-11 15:28:53 +08:00
parent 13ae5e3ade
commit 1ec8f639cb
@@ -269,6 +269,7 @@
style="width: 0px; overflow: hidden" style="width: 0px; overflow: hidden"
:show-all-levels="false" :show-all-levels="false"
@change="handleCascaderChange" @change="handleCascaderChange"
@visible-change="handleUserMenuVisibleChange"
ref="userCascader" ref="userCascader"
> >
<template slot-scope="{ data }"> <template slot-scope="{ data }">
@@ -681,6 +682,16 @@ export default {
} }
}, },
// 处理用户菜单可见性变化
handleUserMenuVisibleChange(visible) {
this.userMenuVisible = visible;
// 如果菜单关闭了,也要清空选择值
if (!visible) {
this.completeResetCascader();
}
},
// 使用 mapActions 引入 Vuex 的 logout action // 使用 mapActions 引入 Vuex 的 logout action
...mapActions(["logout"]), ...mapActions(["logout"]),
}, },