feat(Company): 优化主题系统,添加颜色工具函数和 ESLint 规则
- 新增 colorUtils.ts:提供 alpha()、hex()、fui.* 语义化颜色 API - 新增 chartTheme:统一图表主题配置(坐标轴、tooltip、渐变等) - 扩展 FUI_COLORS.line:完整的透明度级别(0.03-0.8) - 新增 ESLint 规则:检测硬编码金色值(rgba/hex),warning 级别 - 迁移 chartOptions.ts:~15 处硬编码值改用工具函数 - 迁移 shared/styles.ts:~8 处硬编码值改用工具函数 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
* 使用方式:
|
||||
* import { COLORS, GLOW, GLASS } from '@views/Company/theme';
|
||||
* import { FUI_COLORS, FUI_THEME } from '@views/Company/theme';
|
||||
* import { alpha, fui, chartTheme } from '@views/Company/theme';
|
||||
*/
|
||||
|
||||
// 完整主题对象
|
||||
@@ -20,6 +21,22 @@ export {
|
||||
// 主题组件
|
||||
export * from './components';
|
||||
|
||||
// ============================================
|
||||
// 工具函数导出(推荐使用)
|
||||
// ============================================
|
||||
|
||||
export {
|
||||
// 核心工具
|
||||
alpha,
|
||||
hex,
|
||||
fui,
|
||||
BASE_COLORS,
|
||||
OPACITY,
|
||||
chartTheme,
|
||||
// 类型
|
||||
type ColorName,
|
||||
} from './utils';
|
||||
|
||||
// ============================================
|
||||
// 便捷常量导出(推荐使用)
|
||||
// ============================================
|
||||
|
||||
Reference in New Issue
Block a user