fix: 修复ts报错
This commit is contained in:
@@ -1,56 +0,0 @@
|
||||
// src/components/StockChart/types.ts
|
||||
// 图表弹窗共享类型和常量
|
||||
|
||||
/**
|
||||
* 股票信息(两个组件共用)
|
||||
*/
|
||||
export interface StockInfo {
|
||||
stock_code: string;
|
||||
stock_name?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 图表颜色常量
|
||||
*/
|
||||
export const CHART_COLORS = {
|
||||
background: '#1a1a1a',
|
||||
border: '#404040',
|
||||
text: '#e0e0e0',
|
||||
textSecondary: '#999',
|
||||
gridLine: '#2a2a2a',
|
||||
up: '#ef5350', // 涨
|
||||
down: '#26a69a', // 跌
|
||||
accent: '#ffd700', // 金色强调
|
||||
avgLine: '#ffa726', // 均价线
|
||||
priceLine: '#2196f3', // 价格线
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* Modal 样式常量
|
||||
*/
|
||||
export const MODAL_STYLES = {
|
||||
border: '2px solid #ffd700',
|
||||
boxShadow: '0 0 30px rgba(255, 215, 0, 0.5)',
|
||||
borderRadius: { mobile: '12px', desktop: '8px' },
|
||||
maxHeight: '85vh',
|
||||
width: { mobile: '96vw', desktop: '90vw' },
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* Tooltip 样式
|
||||
*/
|
||||
export const TOOLTIP_STYLES = {
|
||||
backgroundColor: 'rgba(30, 30, 30, 0.95)',
|
||||
borderColor: '#404040',
|
||||
borderWidth: 1,
|
||||
textStyle: { color: '#e0e0e0' },
|
||||
} as const;
|
||||
|
||||
/**
|
||||
* 轴线样式
|
||||
*/
|
||||
export const AXIS_STYLES = {
|
||||
lineColor: '#404040',
|
||||
labelColor: '#999',
|
||||
fontSize: { mobile: 10, desktop: 12 },
|
||||
} as const;
|
||||
Reference in New Issue
Block a user