feat(ai): 新增AI助手功能及相关组件

refactor(websocket): 重构WebSocket服务管理及字典同步功能

style(login): 优化登录页面样式及背景图

perf(menu): 改进菜单项展开状态监听逻辑

build: 更新依赖并添加prettier和lint-staged配置

docs: 更新README和注释说明

chore: 清理无用代码和文件
This commit is contained in:
zhangtao
2025-12-16 01:29:43 +08:00
parent 156aaf5af6
commit 854d37dcdc
25 changed files with 3118 additions and 104 deletions
@@ -9,6 +9,11 @@
</transition>
</template>
</router-view>
<!-- 返回顶部按钮 -->
<el-backtop target=".app-main">
<div class="i-svg:backtop w-6 h-6" />
</el-backtop>
</section>
</template>
@@ -132,6 +132,16 @@ const onMenuClose = (index: string) => {
expandedMenuIndexes.value = expandedMenuIndexes.value.filter((item) => item !== index);
};
/**
* 监听展开的菜单项变化,更新父菜单样式
*/
watch(
() => expandedMenuIndexes.value,
() => {
updateParentMenuStyles();
}
);
/**
* 监听菜单模式变化:当菜单模式切换为水平模式时,关闭所有展开的菜单项,
* 避免在水平模式下菜单项显示错位。
@@ -220,7 +230,7 @@ function updateParentMenuStyles() {
}
}
} catch (error) {
console.error("Error updating parent menu styles:", error);
console.error("更新父菜单样式时出错:", error);
}
});
}
@@ -102,8 +102,7 @@ const updateMenuState = (topMenuPath: string, skipNavigation = false) => {
// 确保路径有效且不相同才更新,避免重复操作
if (topMenuPath && appStore.activeTopMenuPath) {
appStore.activeTopMenu(topMenuPath); // 设置激活的顶部菜单
// 只有当路由映射表中存在该路径时才更新侧边菜单
permissionStore.setMixLayoutSideMenus(topMenuPath); // 设置混合布局左侧菜单
permissionStore.setMixLayoutSideMenus(topMenuPath); // 只有当路由映射表中存在该路径时才更新侧边菜单。 设置混合布局左侧菜单
}
// 如果是点击菜单且状态已变更,才进行导航