mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-09 02:57:35 +00:00
refactor: 移除调试日志并优化代码结构
移除多处console.log和console.error调试日志 优化路由标签页的自动滚动逻辑,确保当前激活标签可见 调整权限检查逻辑,移除重复的权限检查 更新菜单搜索组件,排除更多路由并优化加载逻辑 清理未使用的文件列表相关代码 添加Element Plus组件样式自动导入
This commit is contained in:
@@ -82,7 +82,7 @@ export const usePermissionStore = defineStore("permission", () => {
|
||||
*
|
||||
* @returns Promise<RouteRecordRaw[]> 解析后的动态路由列表
|
||||
*/
|
||||
async function generateRoutes() {
|
||||
async function generateRoutes():Promise<RouteRecordRaw[]> {
|
||||
try {
|
||||
const userStore = useUserStore();
|
||||
// 确保获取用户信息和路由列表
|
||||
@@ -103,7 +103,6 @@ export const usePermissionStore = defineStore("permission", () => {
|
||||
} catch (error: any) {
|
||||
// 即使失败也要设置状态,避免无限重试
|
||||
isRouteGenerated.value = false;
|
||||
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user