feat: 1.统一右侧抽屉关闭按钮布局 2.统一 UI 组件为 Ant Design 移除 radix-ui、floating-ui 组件 3. 修复 ESLint 文件格式错误的问题

This commit is contained in:
zhanjunhao
2026-11-10 14:08:10 +08:00
parent 5c0849e82b
commit 85214b308a
202 changed files with 29195 additions and 12732 deletions
+11 -7
View File
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { useEffectEvent } from '../common/useEffectEvent';
import { useState, useEffect, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import { Modal } from '@/components/ui';
@@ -190,7 +191,7 @@ export const useLogsData = () => {
};
// Load saved column preferences from localStorage
useEffect(() => {
const onMount = useEffectEvent(() => {
const savedColumns = localStorage.getItem(STORAGE_KEY);
setVisibleColumns(
resolveColumnVisibility(
@@ -201,7 +202,8 @@ export const useLogsData = () => {
: [COLUMN_KEYS.CHANNEL, COLUMN_KEYS.USERNAME, COLUMN_KEYS.RETRY],
),
);
}, []);
});
useEffect(() => onMount(), [onMount]);
// Get default column visibility based on user role
const getDefaultColumnVisibility = () => {
@@ -262,7 +264,7 @@ export const useLogsData = () => {
if (Object.keys(visibleColumns).length > 0) {
localStorage.setItem(STORAGE_KEY, JSON.stringify(visibleColumns));
}
}, [visibleColumns]);
}, [visibleColumns, STORAGE_KEY]);
// 获取表单值的辅助函数,确保所有值都是字符串
const getFormValues = () => {
@@ -659,7 +661,7 @@ export const useLogsData = () => {
};
// Initialize data
useEffect(() => {
const onMount2 = useEffectEvent(() => {
const localPageSize =
parseInt(localStorage.getItem('page-size')) || ITEMS_PER_PAGE;
setPageSize(localPageSize);
@@ -668,14 +670,16 @@ export const useLogsData = () => {
.catch((reason) => {
showError(reason);
});
}, []);
});
useEffect(() => onMount2(), [onMount2]);
// Initialize statistics when formApi is available
useEffect(() => {
const onScopeChange3 = useEffectEvent(() => {
if (formApi) {
handleEyeClick();
}
}, [formApi]);
});
useEffect(() => onScopeChange3(), [onScopeChange3, formApi]);
// 订阅"任务完成"事件:任务转终态时后端会产生消费日志,这里跟随刷新
// 用 ref 保存最新的加载函数,避免依赖数组里塞太多 state 导致频繁重订阅