refactor(前端): 集中管理设计令牌和工具函数

This commit is contained in:
zhang1106
2026-03-10 15:49:02 +08:00
parent 196dc4ae41
commit 7f007f5010
17 changed files with 158 additions and 663 deletions
@@ -13,20 +13,10 @@ import {
} from '@ant-design/icons';
import PortPanel from './PortPanel';
import axios from 'axios';
import { designTokens } from '../config/theme';
const { Text } = Typography;
const designTokens = {
colors: {
primary: { main: '#667eea', gradient: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)' },
success: '#10b981',
error: '#ef4444',
warning: '#f59e0b',
metal: { light: '#9ca3af', DEFAULT: '#6b7280', dark: '#4b5563' },
slot: { empty: '#d1d5db', occupied: '#3b82f6' },
},
};
/**
* 服务器背板可视化组件
* 按照真实服务器背板布局展示网卡和端口