refactor: 大量前端页面/组件样式从硬编码颜色迁移到 antd token 主题变量

This commit is contained in:
xiamuceer-j
2026-03-06 14:14:57 +08:00
parent 7c9716b485
commit f1d7975ea4
40 changed files with 1755 additions and 1375 deletions
+7 -4
View File
@@ -1,4 +1,5 @@
import React from 'react';
import { theme } from 'antd';
interface SSEProgressBarProps {
loading: boolean;
@@ -11,6 +12,8 @@ export const SSEProgressBar: React.FC<SSEProgressBarProps> = ({
progress,
message
}) => {
const { token } = theme.useToken();
if (!loading) return null;
return (
@@ -18,14 +21,14 @@ export const SSEProgressBar: React.FC<SSEProgressBarProps> = ({
{/* 进度条 */}
<div style={{
height: 8,
background: '#f0f0f0',
background: token.colorFillTertiary,
borderRadius: 4,
overflow: 'hidden',
marginBottom: 8
}}>
<div style={{
height: '100%',
background: progress === 100 ? '#52c41a' : '#1890ff',
background: progress === 100 ? token.colorSuccess : token.colorPrimary,
width: `${progress}%`,
transition: 'all 0.3s ease',
borderRadius: 4
@@ -39,12 +42,12 @@ export const SSEProgressBar: React.FC<SSEProgressBarProps> = ({
alignItems: 'center',
fontSize: 14
}}>
<span style={{ color: '#666' }}>
<span style={{ color: token.colorTextSecondary }}>
{message || '准备生成...'}
</span>
<span style={{
fontWeight: 'bold',
color: progress === 100 ? '#52c41a' : '#1890ff'
color: progress === 100 ? token.colorSuccess : token.colorPrimary
}}>
{progress}%
</span>