feat: 合并代码后 系统设置 ui样式优化、bug修复、全局统一图标对齐等

This commit is contained in:
zhanjunhao
2026-11-10 17:27:36 +08:00
parent 5463a0c772
commit ed9820e6a6
195 changed files with 3546 additions and 1984 deletions
+13 -3
View File
@@ -31,6 +31,7 @@ import {
theme,
} from 'antd';
import { useTranslation } from 'react-i18next';
import TableEmpty from '../common/table/TableEmpty';
import {
ConsoleSearchContext,
useConsolePage,
@@ -41,13 +42,17 @@ const classes = (base, extra) => [base, extra].filter(Boolean).join(' ');
export function ConsoleAlert({ className, style, type = 'info', ...props }) {
const { token } = theme.useToken();
const semantic = type[0].toUpperCase() + type.slice(1);
const isSettings = useConsolePage()?.page.key === 'setting';
const semantic = isSettings ? 'Info' : type[0].toUpperCase() + type.slice(1);
return (
<Alert
{...props}
type={type}
showIcon
className={classes('console-alert', className)}
className={classes(
isSettings ? 'console-alert console-alert--settings' : 'console-alert',
className,
)}
style={{
...style,
marginBlock: style?.marginBlock ?? '0 16px',
@@ -56,6 +61,9 @@ export function ConsoleAlert({ className, style, type = 'info', ...props }) {
background: token[`color${semantic}Bg`],
borderColor: token[`color${semantic}Border`],
color: token.colorText,
...(isSettings
? { '--settings-alert-icon-color': token.colorInfo }
: {}),
}}
/>
);
@@ -135,15 +143,17 @@ export const ConsoleTable = forwardRef(function ConsoleTable(
{ className, scroll, locale, size = 'middle', ...props },
ref,
) {
const isSettings = useConsolePage()?.page.key === 'setting';
return (
<Table
{...props}
ref={ref}
size={size}
size={isSettings ? 'middle' : size}
scroll={{ x: 'max-content', ...scroll }}
locale={{
emptyText: <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />,
...locale,
...(isSettings ? { emptyText: <TableEmpty /> } : {}),
}}
className={classes('console-table', className)}
/>