merge: 合并远程 A2 告警引擎分布式安全更新,保留本地日志中心等最新改动
This commit is contained in:
commit
23e9e3da62
137 files changed
+947
-611
No files matched your search
@@ -6,6 +6,7 @@ import { Sidebar } from './Sidebar';
|
||||
import { Header } from './Header';
|
||||
import { Breadcrumb } from './Breadcrumb';
|
||||
import { userApi } from '@/api';
|
||||
import type { JsonData } from '@/types/common';
|
||||
|
||||
/**
|
||||
* MainLayout - 优化后的主布局组件
|
||||
@@ -30,7 +31,7 @@ export function MainLayout() {
|
||||
if (!token || permissions !== null) return;
|
||||
let cancelled = false;
|
||||
userApi.getMyPermissions()
|
||||
.then((data: any) => {
|
||||
.then((data: JsonData) => {
|
||||
if (cancelled) return;
|
||||
const perms: string[] = data?.permissions ?? [];
|
||||
setPermissions(Array.isArray(perms) ? perms : []);
|
||||
|
||||
Reference in new issue
Block a user