fix(切换身份联动): 消息角标/消息页/设置中心随身份切换自动重拉——Header 摘要挂 switchRole、msg 页与 Settings pane watch curRoleUid(桌面/应用中心既有机制不变),无需手动刷新
build / build (push) Successful in 41s

This commit is contained in:
chenxing
2026-10-09 15:33:26 +08:00
parent ac67215c78
commit 1b812bc9c9
3 changed files with 42 additions and 1 deletions
+7
View File
@@ -421,9 +421,16 @@ onMounted(async () => {
});
onUnmounted(() => {
mittBus.off("searchReset");
mittBus.off("switchRole", onSwitchRoleRefresh);
window.removeEventListener("keydown", onCmdkKeydown);
closeMsgWs();
});
// 切换身份后角标随新身份学校口径刷新(emit 在 savUserRole 落库之后,服务端 identity/current 已是新校)
function onSwitchRoleRefresh() {
loadSummary();
}
mittBus.on("switchRole", onSwitchRoleRefresh);
// 面板已是模态框,输入只驱动面板自身过滤;
// 不再 emit("searchChange") —— 背景应用网格保持原样(2026-10-08 用户修订 1)
watch(searchAppText, () => {