feat(web): 前端全局重构专业量化后台(深色+红涨绿跌+设计系统)

- 设计系统 styles/tokens.css: 深色token(#0d1117底/#161b22卡片) + 红涨绿跌
  (--up#f85149/--down#3fb950) + 品牌蓝#1890ff + 间距/圆角/阴影/mono
- Element Plus深色(element-dark.css + dark/css-vars)+reset
- 删Vite脚手架残留(style.css重写/HelloWorld/hero/vite/vue资源)
- Layout重构(深色专业侧边)+Login+图表统一深色(useChart/echartsDark)
- 新建paper/Live.vue实走监控(step状态/净值/持仓/今日信号10s轮询)
- 业务页套.page头, 保留所有功能/路由/api
- 验证: vue-tsc --noEmit  + npm run build 
This commit is contained in:
2026-07-09 23:02:31 +08:00
parent 252deb5ec7
commit 18d4ba2013
29 changed files with 987 additions and 574 deletions
+49
View File
@@ -0,0 +1,49 @@
/* ECharts 深色量化主题 —— 全站统一:深色轴线/文字/网格,红涨绿跌,净值品牌色 */
export const UP = '#f85149' // 红涨(A股惯例)
export const DOWN = '#3fb950' // 绿跌
export const BRAND = '#1890ff'
export const TEXT = '#e6edf3'
export const TEXT_DIM = '#8b949e'
export const AXIS = '#30363d'
export const SPLIT = '#21262d'
export const TOOLTIP_BG = '#1c2128'
/** 通用深色坐标轴片段(合并进 xAxis/yAxis */
export function darkAxis(): Record<string, unknown> {
return {
axisLine: { lineStyle: { color: AXIS } },
axisTick: { lineStyle: { color: AXIS } },
axisLabel: { color: TEXT_DIM, fontSize: 11 },
splitLine: { lineStyle: { color: SPLIT } },
}
}
/** 通用深色 tooltip */
export function darkTooltip(): Record<string, unknown> {
return {
trigger: 'axis',
backgroundColor: TOOLTIP_BG,
borderColor: AXIS,
borderWidth: 1,
textStyle: { color: TEXT, fontSize: 12 },
}
}
/** 通用深色 grid */
export function darkGrid(): Record<string, unknown> {
return { left: 48, right: 20, top: 40, bottom: 32 }
}
/** 通用标题样式 */
export function darkTitle(text: string): Record<string, unknown> {
return { text, left: 'left', textStyle: { color: TEXT, fontSize: 13 } }
}
/** K 线 itemStyle:红涨绿跌 */
export const klineItemStyle = {
color: UP, // 阳线(收盘≥开盘)
color0: DOWN, // 阴线
borderColor: UP,
borderColor0: DOWN,
}