+
{{ item.text }}
@@ -71,7 +71,7 @@ function prettyResult(result: string) {
{{ JSON.stringify(call.arguments) }}
-
{{ call.result === null ? "等待结果…" : prettyResult(call.result) }}
+
{{ call.result === null ? "等待结果…" : prettyResult(call.result) }}
@@ -84,9 +84,6 @@ function prettyResult(result: string) {
diff --git a/web/src/pages/market/chart.ts b/web/src/pages/market/chart.ts
index 48da061..f257445 100644
--- a/web/src/pages/market/chart.ts
+++ b/web/src/pages/market/chart.ts
@@ -1,13 +1,9 @@
import type { DeepPartial, Period, Styles } from "klinecharts"
-import { PALETTE } from "@/styles/palette"
-export const UP = PALETTE.candleUp
-export const DOWN = PALETTE.candleDown
-const GRID = PALETTE.panelHighest
-const AXIS = PALETTE.line
-const TEXT = PALETTE.faint
-// canvas 读不到 CSS 变量,字体直接写;未设置时 KLineChart 默认 Helvetica Neue,缺字体时会回退成衬线体
-const FONT = `"JetBrains Mono Variable", ui-monospace, "PingFang SC", "Microsoft YaHei", monospace`
+export const UP = "#0ecb81"
+export const DOWN = "#f6465d"
+const GRID = "#2b3139"
+const TEXT = "#848e9c"
/** “分时”用 1m 数据画面积图,与币安一致 */
export const TIME_LINE = "time"
@@ -63,7 +59,7 @@ export function toPeriod(interval: string): Period {
return { type, span }
}
-/** 在内置 dark 主题上覆盖:币安涨跌色 + 站点配色与字体 */
+/** 在内置 dark 主题上覆盖币安配色 */
export const BINANCE_STYLES: DeepPartial
= {
grid: {
horizontal: { color: GRID },
@@ -82,22 +78,13 @@ export const BINANCE_STYLES: DeepPartial = {
noChangeWickColor: TEXT
},
priceMark: {
- high: { textFamily: FONT },
- low: { textFamily: FONT },
- last: { upColor: UP, downColor: DOWN, noChangeColor: TEXT, text: { family: FONT } }
- },
- tooltip: { title: { family: FONT }, legend: { family: FONT } }
+ last: { upColor: UP, downColor: DOWN, noChangeColor: TEXT }
+ }
},
indicator: {
- ohlc: { upColor: UP, downColor: DOWN, noChangeColor: TEXT },
- lastValueMark: { text: { family: FONT } },
- tooltip: { title: { family: FONT }, legend: { family: FONT } }
+ ohlc: { upColor: UP, downColor: DOWN, noChangeColor: TEXT }
},
- xAxis: { axisLine: { color: AXIS }, tickText: { color: TEXT, family: FONT } },
- yAxis: { axisLine: { color: AXIS }, tickText: { color: TEXT, family: FONT } },
- crosshair: {
- horizontal: { text: { family: FONT } },
- vertical: { text: { family: FONT } }
- },
- separator: { color: AXIS }
+ xAxis: { axisLine: { color: GRID }, tickText: { color: TEXT } },
+ yAxis: { axisLine: { color: GRID }, tickText: { color: TEXT } },
+ separator: { color: GRID }
}
diff --git a/web/src/pages/market/index.vue b/web/src/pages/market/index.vue
index 3644378..b132bbb 100644
--- a/web/src/pages/market/index.vue
+++ b/web/src/pages/market/index.vue
@@ -189,9 +189,9 @@ onBeforeUnmount(() => {
-
+
-
+
{
:value="`${s.market}:${s.symbol}`" :label="`${s.base}/${s.quote}${s.market === 'um' ? ' 永续' : ''}`"
>
{{ s.base }}/{{ s.quote }}
- {{ s.status === "error" ? "出错" : "补齐中" }}
+ {{ s.status === "error" ? "出错" : "补齐中" }}
@@ -232,8 +232,8 @@ onBeforeUnmount(() => {
{{ formatBig(ticker.quoteVolume) }}
-
● {{ connected ? "实时" : "断开" }}
-
+ ● {{ connected ? "实时" : "断开" }}
+
新增交易对
@@ -242,7 +242,7 @@ onBeforeUnmount(() => {
-
+
{
-
+
{{ INTERVAL_LABELS[dataInterval] }} 历史数据补齐中 {{ backfillProgress }}%,最新部分暂未完整
-
+
{{ tool.label }}
- 清除
+ 清除
@@ -344,27 +344,28 @@ onBeforeUnmount(() => {
font-size: 12px;
}
.stat > div:first-child {
- color: var(--ap-muted);
+ color: #848e9c;
}
.tool {
padding: 2px 8px;
- color: var(--ap-muted);
+ border-radius: 4px;
+ color: #848e9c;
cursor: pointer;
white-space: nowrap;
}
.tool:hover {
- color: var(--ap-text);
- background: var(--ap-panel-highest);
+ color: #eaecef;
+ background: #2b3139;
}
.tool.active {
- color: var(--ap-brand);
+ color: #f0b90b;
}
.symbol-select :deep(.el-select__wrapper) {
- background: var(--ap-panel-high);
+ background: #2b3139;
box-shadow: none;
}
.symbol-select :deep(.el-select__selected-item) {
- color: var(--ap-text);
+ color: #eaecef;
font-weight: 600;
}
diff --git a/web/src/pages/news/components/NewsDrawer.vue b/web/src/pages/news/components/NewsDrawer.vue
index 0e7dec7..4f437ae 100644
--- a/web/src/pages/news/components/NewsDrawer.vue
+++ b/web/src/pages/news/components/NewsDrawer.vue
@@ -2,7 +2,6 @@
import type { NewsDetail, Revision } from "@/apis/news"
import { getNews, listRevisions } from "@/apis/news"
import { useSourceNames } from "@/composables/useSourceNames"
-import { PALETTE } from "@/styles/palette"
import { diffLines, formatTime, htmlToLines } from "@/utils/text"
const newsId = defineModel
({ required: true })
@@ -28,7 +27,7 @@ watch(newsId, async (id) => {
// 第三方正文放进无脚本权限的 sandbox iframe,避免其中的脚本访问本站
const srcdoc = computed(() => detail.value && `
-
+
${detail.value.content_html}`)
const diff = computed(() => {
@@ -45,11 +44,11 @@ const diff = computed(() => {
-
+
{{ detail.title || detail.excerpt.slice(0, 60) }}
-
+
{{ sourceNames[detail.source_code] ?? detail.source_code }}
{{ formatTime(detail.published_at, "YYYY-MM-DD HH:mm:ss") }}
@@ -77,7 +76,7 @@ const diff = computed(() => {
{{ line.type === "add" ? "+ " : line.type === "del" ? "- " : " " }}{{ line.text }}
diff --git a/web/src/pages/news/index.vue b/web/src/pages/news/index.vue
index 0966a0c..77afe57 100644
--- a/web/src/pages/news/index.vue
+++ b/web/src/pages/news/index.vue
@@ -71,7 +71,7 @@ load()
-
+
{{ name }}
@@ -85,9 +85,8 @@ load()
查询
-
- {{ connected ? "实时推送已连接" : "实时推送断开" }}
+ {{ connected ? "实时推送已连接" : "实时推送断开" }}
@@ -96,14 +95,14 @@ load()
class="cursor-pointer" @click="search"
/>
-
+
-
+
{{ sourceNames[item.source_code] ?? item.source_code }}
{{ formatTime(item.published_at) }}
@@ -114,10 +113,10 @@ load()
付费
-
+
{{ item.title }}
-
+
{{ item.summary || item.excerpt }}
diff --git a/web/src/pages/settings/index.vue b/web/src/pages/settings/index.vue
index 8511103..49ac3ec 100644
--- a/web/src/pages/settings/index.vue
+++ b/web/src/pages/settings/index.vue
@@ -131,67 +131,64 @@ loadExchange()
-
-
-
-
- 模型配置
- 通过 Sub2API 等中转接入;API key 加密存储,页面只显示末 4 位
-
-
- 新增配置
+
+
+ 模型配置
+ 通过 Sub2API 等中转接入;API key 加密存储,页面只显示末 4 位
+
+
+ 新增配置
+
+
+
+
+
+
+ {{ row.name }}
+
+ 默认
+
+
+
+
+
+ {{ PROTOCOL_LABELS[row.protocol as keyof typeof PROTOCOL_LABELS] }}
+
+
+
+
+
+
+ {{ (row as Provider).reasoning_effort ?? "-" }}
+
+
+
+
+ ****{{ row.api_key_hint }}
+
+
+
+
+ {{ formatTime(row.updated_at, "MM-DD HH:mm") }}
+
+
+
+
+
+ 测试连接
-
-
-
-
-
- {{ row.name }}
-
- 默认
-
-
-
-
-
- {{ PROTOCOL_LABELS[row.protocol as keyof typeof PROTOCOL_LABELS] }}
-
-
-
-
-
-
- {{ (row as Provider).reasoning_effort ?? "-" }}
-
-
-
-
- ****{{ row.api_key_hint }}
-
-
-
-
- {{ formatTime(row.updated_at, "MM-DD HH:mm") }}
-
-
-
-
-
- 测试连接
-
-
- 编辑
-
-
- 设为默认
-
-
- 删除
-
-
-
-
-
+
+ 编辑
+
+
+ 设为默认
+
+
+ 删除
+
+
+
+
@@ -248,41 +245,37 @@ loadExchange()
-
-
-
-
- 币安模拟盘
- 只连接币安模拟盘(demo-fapi.binance.com);在 demo.binance.com 的 API 管理创建 key,并开启合约交易权限
-
-
-
- 测试连接
-
-
- {{ exchange?.configured ? "修改 key" : "填写 key" }}
-
-
- 删除
-
-
-
-
-
-
- {{ exchange.configured ? `****${exchange.api_key_hint}` : "未配置" }}
-
-
-
- 交易中(停止后才能修改 key)
-
- 未运行
-
-
- {{ exchange.updated_at ? formatTime(exchange.updated_at, "MM-DD HH:mm") : "-" }}
-
-
-
+
+
+ 币安模拟盘
+ 只连接币安模拟盘(demo-fapi.binance.com);在 demo.binance.com 的 API 管理创建 key,并开启合约交易权限
+
+
+
+ 测试连接
+
+
+ {{ exchange?.configured ? "修改 key" : "填写 key" }}
+
+
+ 删除
+
+
+
+
+
+ {{ exchange.configured ? `****${exchange.api_key_hint}` : "未配置" }}
+
+
+
+ 交易中(停止后才能修改 key)
+
+ 未运行
+
+
+ {{ exchange.updated_at ? formatTime(exchange.updated_at, "MM-DD HH:mm") : "-" }}
+
+
diff --git a/web/src/pages/skills/index.vue b/web/src/pages/skills/index.vue
index 625a4b3..20efb2b 100644
--- a/web/src/pages/skills/index.vue
+++ b/web/src/pages/skills/index.vue
@@ -145,9 +145,9 @@ loadTree()
-
+
diff --git a/web/src/pages/trading/components/AnalysisDrawer.vue b/web/src/pages/trading/components/AnalysisDrawer.vue
index 0662d52..fa4604b 100644
--- a/web/src/pages/trading/components/AnalysisDrawer.vue
+++ b/web/src/pages/trading/components/AnalysisDrawer.vue
@@ -1,9 +1,8 @@
-
-
-
-
-
-
-
- {{ detail ? `分析 #${detail.id} · ${detail.symbol}` : "分析" }}
-
- {{ formatTime(detail.started_at) }} – {{ formatTime(detail.finished_at) }} · {{ detail.reasons.join(";") }}{{ detail.dry_run ? " · 试运行" : "" }}
-
-
-
-
+
-
-
-
- 分析 ID
-
-
#{{ detail.id }}
-
-
-
- 耗时
-
-
{{ detail.finished_at ? formatDuration(detail.started_at, detail.finished_at) : "-" }}
-
-
-
- token 输入 / 输出
-
-
{{ detail.usage?.input_tokens.toLocaleString() ?? "-" }} / {{ detail.usage?.output_tokens.toLocaleString() ?? "-" }}
-
-
-
- 模型 / 思考强度
-
-
{{ detail.model ?? "-" }}{{ detail.reasoning_effort ? ` / ${detail.reasoning_effort}` : "" }}
-
+
+ {{ formatTime(detail.started_at) }} – {{ formatTime(detail.finished_at) }} · {{ detail.reasons.join(";") }}
+ · {{ detail.model }}{{ detail.reasoning_effort ? ` / ${detail.reasoning_effort}` : "" }}
+ · {{ detail.usage?.input_tokens.toLocaleString() }} / {{ detail.usage?.output_tokens.toLocaleString() }} token
+ {{ detail.dry_run ? "· 试运行" : "" }}
-
-
- 模型分析
-
-
-
-
-
-
- 输入数据与工具调用 ({{ toolResults.size }})
-
-
-
-
- {{ m.text }}
+
+
+
+
+
+ {{ m.text }}
+
+
+
+
+ {{ call.name }} {{ JSON.stringify(call.arguments) }}
+
+ {{ pretty(toolResults.get(call.id)) }}
-
-
-
-
- {{ call.name }}
- {{ JSON.stringify(call.arguments) }}
-
-
- {{ pretty(toolResults.get(call.id)) }}
-
-
-
-
+
+
diff --git a/web/src/pages/trading/components/PlanCard.vue b/web/src/pages/trading/components/PlanCard.vue
index a809c65..d697275 100644
--- a/web/src/pages/trading/components/PlanCard.vue
+++ b/web/src/pages/trading/components/PlanCard.vue
@@ -1,8 +1,7 @@
-
-
-
-
-
-
{{ symbol.symbol }}
-
短线做波动(区间内挂限价单,最长持仓 4 小时)
+
+
+
{{ symbol.symbol }}
+
短线做波动(区间内挂限价单,最长持仓 4 小时)
-
+
查看完整分析
-
-
-
-
-
+
+
{{ busy ? "分析中" : "立即分析" }}
-
+
还没有分析。引擎停止时点「立即分析」为试运行:计划只记录,不下单。
-
-
模型分析中,已用 {{ elapsed }} 秒(通常 1–3 分钟)…
+
+ 模型分析中,已用 {{ elapsed }} 秒(通常 1–3 分钟)…
{{ formatTime(analysis.started_at) }} 分析失败:{{ analysis.error }}
-
+
-
+
试运行
-
+
{{ PLAN_STATUS_LABELS[analysis.plan_status] }}
-
+
{{ ACTION_LABELS[decision.action] }}
-
+
{{ decision.direction === "long" ? "做多" : "做空" }}
-
+
置信度{{ CONFIDENCE_LABELS[decision.confidence] }}
-
+
{{ formatTime(analysis.started_at) }} · {{ analysis.reasons.join(";") }} · {{ analysis.model }}{{ analysis.reasoning_effort ? ` / ${analysis.reasoning_effort}` : "" }}
- {{ duration ? `· 耗时 ${duration}` : "" }}
· {{ analysis.usage?.input_tokens.toLocaleString() }} / {{ analysis.usage?.output_tokens.toLocaleString() }} token
-
-
+
{{ decision.summary }}
-
-
+
最近一次分析 #{{ latest.id }}({{ formatTime(latest.started_at) }}):
{{ latest.decision?.summary }}
@@ -122,106 +111,56 @@ const ladder = computed(() => sizing.value?.entry && entryRow.value
{{ latest.status === "running" ? "分析中" : `失败:${latest.error}` }}
-
+
查看
-
-
-
-
-
-
- 限价单有效至 {{ formatTime(analysis.valid_until, "MM-DD HH:mm") }}(剩 {{ countdown(analysis.valid_until) }})
-
-
入场 {{ formatTime(analysis.first_fill_at, "MM-DD HH:mm") }}
-
- 最晚平仓 {{ formatTime(analysis.close_deadline, "MM-DD HH:mm") }}(剩 {{ countdown(analysis.close_deadline) }})
-
+
+ 限价单有效至{{ formatTime(analysis.valid_until, "MM-DD HH:mm") }}(剩 {{ countdown(analysis.valid_until) }})
+ 入场{{ formatTime(analysis.first_fill_at, "MM-DD HH:mm") }}
+ 最晚平仓{{ formatTime(analysis.close_deadline, "MM-DD HH:mm") }}(剩 {{ countdown(analysis.close_deadline) }})
-
-
- 结果{{ CLOSE_REASON_LABELS[analysis.close_reason ?? ""] ?? analysis.close_reason }},净盈亏
- {{ analysis.result.net }} USDT(手续费 {{ analysis.result.commission }})
-
-
-
-
为什么{{ decision.reasons }}
+
+ 结果{{ CLOSE_REASON_LABELS[analysis.close_reason ?? ""] ?? analysis.close_reason }},净盈亏 {{ analysis.result.net }} USDT(手续费 {{ analysis.result.commission }})
+
为什么{{ decision.reasons }}
-
-
-
- {{ long ? "支撑区" : "压力区" }}
- {{ sizing.setup.zone_low }} – {{ sizing.setup.zone_high }}
-
-
- {{ decision.setup.basis }}
-
-
- 限价{{ long ? "做多" : "做空" }}
- {{ sizing.entry.price }} × {{ sizing.entry.quantity }}
-
-
- 已成交 {{ filled("entry", 0) }}{{ entryRow?.avg_price ? `,均价 ${entryRow.avg_price}` : "" }};名义 {{ sizing.entry.notional }} USDT,{{ sizing.entry.leverage }} 倍交易资金
-
+
+
+ {{ long ? "支撑区" : "压力区" }}{{ sizing.setup.zone_low }} – {{ sizing.setup.zone_high }} · {{ decision.setup.basis }}
-
-
- 止损
- {{ currentStop ?? sizing.entry.stop }}
-
-
- 初始止损 / 距挂单价
- {{ sizing.entry.stop }} / {{ sizing.entry.stop_pct }}%
-
-
- 止损亏损
- {{ sizing.entry.risk_at_stop }} USDT(交易资金的 {{ sizing.entry.risk_pct }}%)
-
-
- 区间远端外 0.5×ATR(5m)、距挂单价至少 1×ATR(5m);止盈 1 后移到保本价{{ sizing.entry.capped_by_leverage ? ";受 3 倍上限限制" : "" }}
-
+
+ 限价{{ long ? "做多" : "做空" }}{{ sizing.entry.price }} × {{ sizing.entry.quantity }},已成交 {{ filled("entry", 0) }}{{ entryRow?.avg_price ? `,均价 ${entryRow.avg_price}` : "" }}
+ (名义 {{ sizing.entry.notional }} USDT,{{ sizing.entry.leverage }} 倍交易资金)
+
+
+ 止损{{ currentStop ?? sizing.entry.stop }}(初始 {{ sizing.entry.stop }},距挂单价 {{ sizing.entry.stop_pct }}%;区间远端外 0.5×ATR(5m)、距挂单价至少 1×ATR(5m),止盈 1 后移到保本价)
+
+
+ 止损亏损{{ sizing.entry.risk_at_stop }} USDT(交易资金的 {{ sizing.entry.risk_pct }}%){{ sizing.entry.capped_by_leverage ? ",受 3 倍上限限制" : "" }}
-
-
-
- 分批止盈
-
-
-
-
- 止盈 {{ row.leg + 1 }}
-
-
-
-
-
-
- {{ row.price }}
-
-
-
-
-
+
+
+
+ 止盈 {{ row.leg + 1 }}
+
+
+
+
+
+
+
-
-
-
-
-
- 重新判断:{{ condition(c) }}:{{ c.basis }}
-
-
-
-
-
-
风险:{{ decision.risks }}
+
+
重新判断
+
+ · {{ condition(c) }}:{{ c.basis }}
+
风险{{ decision.risks }}
@@ -229,28 +168,7 @@ const ladder = computed(() => sizing.value?.entry && entryRow.value
diff --git a/web/src/pages/trading/index.vue b/web/src/pages/trading/index.vue
index 63b5b41..5342aed 100644
--- a/web/src/pages/trading/index.vue
+++ b/web/src/pages/trading/index.vue
@@ -1,7 +1,6 @@
-
-
-
-
-
- {{ snapshot ? "引擎在线" : "引擎离线" }}
+
+
+
+
+
+ 引擎在线
+
+
+ 引擎离线
- {{ status.running ? "交易中" : "已停止" }}
+ {{ status.running ? "交易中" : "已停止" }}
{{ status.running ? "停止" : "开始行情交易" }}
-
-
- 今日分析{{ status.today.analyses }} / {{ status.today.limit }}
- token{{ status.today.input_tokens.toLocaleString() }} / {{ status.today.output_tokens.toLocaleString() }}
-
-
-
- 模型:
-
-
-
-
-
- 思考:
-
-
-
-
-
- 交易资金
-
- {{ money(status.capital_usdt) }}USDT
-
- (权益不足,按 {{ money(status.effective_capital) }})
-
-
- 未设置
- 设置
-
-
账户权益{{ money(account?.margin_balance) }}USDT
-
可用{{ money(account?.available_balance) }}USDT
-
- 未实现盈亏{{ signedMoney(account?.unrealized_pnl) }}
-
-
- 今日收益{{ signedMoney(status.today.net_pnl) }}USDT
-
-
今日交易{{ status.today.trades }}笔
-
胜率{{ winRate }}
+
+ 交易资金
+
+ {{ money(status.capital_usdt) }} USDT
+
+ (权益不足,按 {{ money(status.effective_capital) }})
+
+
+ 未设置
+
+ 设置
+
+
+ 账户权益{{ money(account?.margin_balance) }} USDT
+
+
+ 可用{{ money(account?.available_balance) }} USDT
+
+
+ 未实现盈亏
+ {{ money(account?.unrealized_pnl) }}
+
+
+ 今日分析{{ status.today.analyses }} / {{ status.today.limit }}
+ token{{ status.today.input_tokens.toLocaleString() }} / {{ status.today.output_tokens.toLocaleString() }}
+
+
+
+
+
+
+
+
@@ -331,195 +311,165 @@ onBeforeUnmount(() => clearInterval(timer))
-
-
-
- 持仓 ({{ positions.length }})
-
-
-
-
- {{ row.symbol }}
-
- 永续
-
-
-
-
-
-
- {{ row.side === "LONG" ? "多" : "空" }}
-
-
-
-
-
- {{ num(row.amount) }}
-
-
-
-
- {{ num(row.entry_price) }}
-
-
-
-
- {{ money(row.break_even_price) }}
-
-
-
-
- {{ money(row.mark_price) }}
-
-
-
-
- {{ signedMoney(row.unrealized_pnl) }}
-
-
-
-
- {{ Number(row.liquidation_price) ? money(row.liquidation_price) : "-" }}
-
-
-
-
-
- {{ row.leverage }}x {{ row.margin_type === "ISOLATED" ? "逐仓" : "全仓" }}
-
-
-
-
-
- {{ exitPrices(row as SnapshotPosition).stop }}
- /
- {{ exitPrices(row as SnapshotPosition).target }}
-
-
-
-
- {{ closeCountdown(row.symbol) }}
-
-
-
-
-
-
-
-
-
-
- 交易币种 ({{ symbols.length }})
-
- 新增
-
-
+
+
+
+
+
+ {{ row.side === "LONG" ? "多" : "空" }}
+
-
+
+
+
+ {{ num(row.amount) }}
+
+
+
+
+ {{ num(row.entry_price) }}
+
+
+
+
+ {{ Number(row.break_even_price).toFixed(2) }}
+
+
+
+
+ {{ Number(row.mark_price).toFixed(2) }}
+
+
+
+
+ {{ money(row.unrealized_pnl) }}
+
+
+
+
+ {{ Number(row.liquidation_price) ? Number(row.liquidation_price).toFixed(2) : "-" }}
+
+
+
+
+ {{ row.leverage }}x {{ row.margin_type === "ISOLATED" ? "逐仓" : "全仓" }}
+
+
+
+
+ {{ exitPrices(row as SnapshotPosition).stop }} / {{ exitPrices(row as SnapshotPosition).target }}
+
+
+
+
+ {{ closeCountdown(row.symbol) }}
+
+
+
+
+
+
+
+
+ 交易币种
+
+ 新增
+
+
+
- {{ s.symbol }}
+ {{ s.symbol }}
{{ symbolState(s).label }}
-
-
- {{ positionLine(s.symbol)!.text }}
-
-
-
+
+
删除
-
+
-
-
-
-
-
-
- {{ current ? `${current.symbol} · 交易计划` : "交易计划" }}
-
-
-
-
+
+
+
+
-
-
- 当前挂单 ({{ symbolOrders.length }})
-
-
-
-
- {{ row.type }}
-
- 条件单
-
-
-
-
-
- {{ row.side === "BUY" ? "买" : "卖" }}{{ row.reduce_only ? "(只减仓)" : "" }}
-
-
-
-
-
- {{ row.quantity === "全部持仓" ? row.quantity : num(row.quantity) }}
-
-
-
-
- {{ isOwnOrder(row.client_id) ? "本程序" : "手动" }}
-
-
-
-
- {{ formatTime(new Date(row.time).toISOString()) }}
-
-
-
-
-
-
-
- 时间线
-
-
-
-
-
- {{ formatTime(e.created_at) }}
-
- {{ e.symbol ?? "账户" }}
-
- {{ e.message }}
-
- 查看分析
-
-
-
-
-
-
- 加载更早的事件
-
-
+
+
+ 当前挂单
+
+
+
+
+ {{ row.type }}
+
+ 条件单
+
+
+
+
+
+ {{ row.side === "BUY" ? "买" : "卖" }}{{ row.reduce_only ? "(只减仓)" : "" }}
+
+
+
+
+
+ {{ row.quantity === "全部持仓" ? row.quantity : num(row.quantity) }}
+
+
+
+
+ {{ isOwnOrder(row.client_id) ? "本程序" : "手动" }}
+
+
+
+
+ {{ formatTime(new Date(row.time).toISOString(), "MM-DD HH:mm:ss") }}
+
+
+
-
-
+
+
+
+ 时间线
+
+
+
+
+ {{ e.symbol ?? "账户" }}
+
+ {{ e.message }}
+
+ 查看分析
+
+
+
+
+
+ 加载更早的事件
+
+
+
+
@@ -528,43 +478,12 @@ onBeforeUnmount(() => clearInterval(timer))
diff --git a/web/src/router/index.ts b/web/src/router/index.ts
index 6a170c5..86bab45 100644
--- a/web/src/router/index.ts
+++ b/web/src/router/index.ts
@@ -1,16 +1,15 @@
-import { ChatDotRound, Collection, DataAnalysis, Document, Monitor, Setting, TrendCharts } from "@element-plus/icons-vue"
import { createRouter, createWebHistory } from "vue-router"
import Layout from "@/layouts/index.vue"
import { useUserStore } from "@/pinia/user"
export const menuRoutes = [
- { path: "/news", name: "news", component: () => import("@/pages/news/index.vue"), meta: { title: "新闻流", icon: Document } },
- { path: "/crawler", name: "crawler", component: () => import("@/pages/crawler/index.vue"), meta: { title: "采集控制台", icon: Monitor } },
- { path: "/market", name: "market", component: () => import("@/pages/market/index.vue"), meta: { title: "行情", icon: TrendCharts } },
- { path: "/trading", name: "trading", component: () => import("@/pages/trading/index.vue"), meta: { title: "模拟盘", icon: DataAnalysis } },
- { path: "/chat", name: "chat", component: () => import("@/pages/chat/index.vue"), meta: { title: "Chat", icon: ChatDotRound } },
- { path: "/skills", name: "skills", component: () => import("@/pages/skills/index.vue"), meta: { title: "Skills", icon: Collection } },
- { path: "/settings", name: "settings", component: () => import("@/pages/settings/index.vue"), meta: { title: "环境变量", icon: Setting } }
+ { path: "/news", name: "news", component: () => import("@/pages/news/index.vue"), meta: { title: "新闻流" } },
+ { path: "/crawler", name: "crawler", component: () => import("@/pages/crawler/index.vue"), meta: { title: "采集控制台" } },
+ { path: "/market", name: "market", component: () => import("@/pages/market/index.vue"), meta: { title: "行情" } },
+ { path: "/trading", name: "trading", component: () => import("@/pages/trading/index.vue"), meta: { title: "模拟盘" } },
+ { path: "/chat", name: "chat", component: () => import("@/pages/chat/index.vue"), meta: { title: "Chat" } },
+ { path: "/skills", name: "skills", component: () => import("@/pages/skills/index.vue"), meta: { title: "Skills" } },
+ { path: "/settings", name: "settings", component: () => import("@/pages/settings/index.vue"), meta: { title: "环境变量" } }
]
export const router = createRouter({
diff --git a/web/src/styles/index.css b/web/src/styles/index.css
index f271f9c..bdb84f4 100644
--- a/web/src/styles/index.css
+++ b/web/src/styles/index.css
@@ -1,5 +1,3 @@
-/* 全站深色交易终端主题。颜色来自 palette.ts(由 UnoCSS preflight 输出为 --ap-* 变量) */
-
html,
body,
#app {
@@ -8,260 +6,14 @@ body,
}
body {
- background: var(--ap-bg);
- color: var(--ap-text);
- font-family: var(--ap-font-mono);
- font-size: 13px;
- font-variant-numeric: tabular-nums;
- color-scheme: dark;
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
-/* 浏览器默认不让表单控件继承字体 */
-button,
-input,
-select,
-textarea {
- font-family: inherit;
-}
-
-* {
- scrollbar-width: thin;
- scrollbar-color: var(--ap-panel-highest) transparent;
-}
-::-webkit-scrollbar {
- width: 6px;
- height: 6px;
-}
-::-webkit-scrollbar-thumb {
- background: var(--ap-panel-highest);
-}
-::-webkit-scrollbar-track {
- background: transparent;
-}
-
-/* ---------- Element Plus 变量 ---------- */
-
-html.dark {
- --el-bg-color: var(--ap-panel);
- --el-bg-color-page: var(--ap-bg);
- --el-bg-color-overlay: var(--ap-panel);
- --el-text-color-primary: var(--ap-text);
- --el-text-color-regular: var(--ap-text);
- --el-text-color-secondary: var(--ap-muted);
- --el-text-color-placeholder: var(--ap-faint);
- --el-text-color-disabled: color-mix(in srgb, var(--ap-faint) 60%, var(--ap-bg));
- --el-border-color: var(--ap-line);
- --el-border-color-dark: var(--ap-faint);
- --el-border-color-darker: var(--ap-faint);
- --el-border-color-light: color-mix(in srgb, var(--ap-line) 80%, var(--ap-panel));
- --el-border-color-lighter: color-mix(in srgb, var(--ap-line) 60%, var(--ap-panel));
- --el-border-color-extra-light: color-mix(in srgb, var(--ap-line) 40%, var(--ap-panel));
- --el-border-color-hover: var(--ap-faint);
- --el-fill-color: var(--ap-panel-high);
- --el-fill-color-light: var(--ap-panel-high);
- --el-fill-color-lighter: var(--ap-panel-low);
- --el-fill-color-extra-light: var(--ap-panel-low);
- --el-fill-color-dark: var(--ap-panel-highest);
- --el-fill-color-darker: var(--ap-panel-highest);
- /* 输入框、下拉框、复选按钮等的底色 */
- --el-fill-color-blank: var(--ap-sunken);
- --el-mask-color: color-mix(in srgb, var(--ap-bg) 80%, transparent);
-
- --el-color-primary: var(--ap-brand);
- --el-color-success: var(--ap-up);
- --el-color-warning: var(--ap-warn);
- --el-color-danger: var(--ap-down);
- --el-color-error: var(--ap-down);
- --el-color-info: var(--ap-faint);
- /* Element 在实底语义色上一律用 --el-color-white 作文字色(按钮、分页、复选按钮、实心标签等);
- 我们的黄、浅绿、浅红都需要深色字 */
- --el-color-white: var(--ap-bg);
-
- --el-border-radius-base: 0;
- --el-border-radius-small: 0;
- --el-border-radius-round: 0;
- --el-font-family: var(--ap-font-mono);
- --el-font-size-base: 13px;
- --el-font-size-small: 12px;
- --el-font-size-extra-small: 11px;
- /* 稿中弹层不用柔和阴影,只用硬描边 */
- --el-box-shadow: 2px 2px 0 #000;
- --el-box-shadow-light: 2px 2px 0 #000;
- --el-box-shadow-lighter: none;
- --el-box-shadow-dark: none;
-}
-
-/* 语义色的浅色/深色档:浅色档向面板色混合,标签自然成为「浅底 + 描边」;深色档在暗色主题里是更亮的悬停色 */
-html.dark {
- --el-color-primary-light-3: color-mix(in srgb, var(--el-color-primary) 70%, var(--ap-panel));
- --el-color-primary-light-5: color-mix(in srgb, var(--el-color-primary) 50%, var(--ap-panel));
- --el-color-primary-light-7: color-mix(in srgb, var(--el-color-primary) 30%, var(--ap-panel));
- --el-color-primary-light-8: color-mix(in srgb, var(--el-color-primary) 22%, var(--ap-panel));
- --el-color-primary-light-9: color-mix(in srgb, var(--el-color-primary) 12%, var(--ap-panel));
- --el-color-primary-dark-2: color-mix(in srgb, var(--el-color-primary) 80%, #fff);
- --el-color-success-light-3: color-mix(in srgb, var(--el-color-success) 70%, var(--ap-panel));
- --el-color-success-light-5: color-mix(in srgb, var(--el-color-success) 50%, var(--ap-panel));
- --el-color-success-light-7: color-mix(in srgb, var(--el-color-success) 30%, var(--ap-panel));
- --el-color-success-light-8: color-mix(in srgb, var(--el-color-success) 22%, var(--ap-panel));
- --el-color-success-light-9: color-mix(in srgb, var(--el-color-success) 12%, var(--ap-panel));
- --el-color-success-dark-2: color-mix(in srgb, var(--el-color-success) 80%, #fff);
- --el-color-warning-light-3: color-mix(in srgb, var(--el-color-warning) 70%, var(--ap-panel));
- --el-color-warning-light-5: color-mix(in srgb, var(--el-color-warning) 50%, var(--ap-panel));
- --el-color-warning-light-7: color-mix(in srgb, var(--el-color-warning) 30%, var(--ap-panel));
- --el-color-warning-light-8: color-mix(in srgb, var(--el-color-warning) 22%, var(--ap-panel));
- --el-color-warning-light-9: color-mix(in srgb, var(--el-color-warning) 12%, var(--ap-panel));
- --el-color-warning-dark-2: color-mix(in srgb, var(--el-color-warning) 80%, #fff);
- --el-color-danger-light-3: color-mix(in srgb, var(--el-color-danger) 70%, var(--ap-panel));
- --el-color-danger-light-5: color-mix(in srgb, var(--el-color-danger) 50%, var(--ap-panel));
- --el-color-danger-light-7: color-mix(in srgb, var(--el-color-danger) 30%, var(--ap-panel));
- --el-color-danger-light-8: color-mix(in srgb, var(--el-color-danger) 22%, var(--ap-panel));
- --el-color-danger-light-9: color-mix(in srgb, var(--el-color-danger) 12%, var(--ap-panel));
- --el-color-danger-dark-2: color-mix(in srgb, var(--el-color-danger) 80%, #fff);
- --el-color-error-light-3: var(--el-color-danger-light-3);
- --el-color-error-light-5: var(--el-color-danger-light-5);
- --el-color-error-light-7: var(--el-color-danger-light-7);
- --el-color-error-light-8: var(--el-color-danger-light-8);
- --el-color-error-light-9: var(--el-color-danger-light-9);
- --el-color-error-dark-2: var(--el-color-danger-dark-2);
- --el-color-info-light-3: color-mix(in srgb, var(--el-color-info) 70%, var(--ap-panel));
- --el-color-info-light-5: color-mix(in srgb, var(--el-color-info) 50%, var(--ap-panel));
- --el-color-info-light-7: color-mix(in srgb, var(--el-color-info) 30%, var(--ap-panel));
- --el-color-info-light-8: color-mix(in srgb, var(--el-color-info) 22%, var(--ap-panel));
- --el-color-info-light-9: color-mix(in srgb, var(--el-color-info) 12%, var(--ap-panel));
- --el-color-info-dark-2: color-mix(in srgb, var(--el-color-info) 80%, #fff);
-}
-
-/* ---------- 组件 ---------- */
-
-/* 面板:1px 边框,32px 标题条 */
-html.dark .el-card {
- --el-card-bg-color: var(--ap-panel);
- --el-card-border-color: var(--ap-line);
- --el-card-border-radius: 0;
- --el-card-padding: 12px;
-}
-.el-card__header {
- display: flex;
- align-items: center;
- gap: 8px;
- box-sizing: border-box;
- min-height: 32px;
- padding: 4px 12px !important;
- border-bottom-color: var(--ap-line) !important;
- background: var(--ap-panel-high);
- font-family: var(--ap-font-head);
- font-size: 12px;
- font-weight: 700;
- letter-spacing: 0.04em;
-}
-
-/* 表格:紧凑行高,表头下沉色,数字等宽 */
-html.dark .el-table {
- --el-table-bg-color: var(--ap-panel);
- --el-table-tr-bg-color: var(--ap-panel);
- --el-table-expanded-cell-bg-color: var(--ap-panel);
- --el-table-header-bg-color: var(--ap-sunken);
- --el-table-header-text-color: var(--ap-muted);
- --el-table-row-hover-bg-color: var(--ap-panel-high);
- --el-table-border-color: color-mix(in srgb, var(--ap-line) 60%, var(--ap-panel));
- --el-table-text-color: var(--ap-text);
-}
-.el-table th.el-table__cell {
- font-size: 11px;
- font-weight: 500;
-}
-
-/* 主按钮:黄底深色字,悬停变亮 */
-html.dark .el-button--primary:not(.is-plain, .is-text, .is-link) {
- --el-button-hover-bg-color: var(--el-color-primary-dark-2);
- --el-button-hover-border-color: var(--el-color-primary-dark-2);
-}
-/* 危险、成功、警告按钮:浅底描边(稿中的「停止」),悬停填实 */
-html.dark .el-button--danger {
- --ap-button-color: var(--el-color-danger);
-}
-html.dark .el-button--success {
- --ap-button-color: var(--el-color-success);
-}
-html.dark .el-button--warning {
- --ap-button-color: var(--el-color-warning);
-}
-html.dark :is(.el-button--danger, .el-button--success, .el-button--warning):not(.is-text, .is-link) {
- --el-button-text-color: var(--ap-button-color);
- --el-button-bg-color: color-mix(in srgb, var(--ap-button-color) 14%, transparent);
- --el-button-border-color: color-mix(in srgb, var(--ap-button-color) 45%, transparent);
- --el-button-hover-text-color: var(--ap-bg);
- --el-button-hover-bg-color: var(--ap-button-color);
- --el-button-hover-border-color: var(--ap-button-color);
- --el-button-active-text-color: var(--ap-bg);
- --el-button-active-bg-color: var(--ap-button-color);
- --el-button-active-border-color: var(--ap-button-color);
-}
-/* 暗色主题里 light-5 是变暗,链接悬停要变亮 */
-html.dark .el-button.is-link {
- --el-button-hover-link-text-color: color-mix(in srgb, var(--el-button-text-color) 75%, #fff);
-}
-
-html.dark .el-tag {
- --el-tag-border-radius: 0;
- font-weight: 600;
-}
-
-/* 树放在面板里,不要下沉底色 */
-html.dark .el-tree {
- background: transparent;
-}
-
-html.dark .el-descriptions__body {
- background-color: var(--ap-panel);
-}
-html.dark .el-descriptions {
- --el-descriptions-item-bordered-label-background: var(--ap-panel-high);
-}
-
-html.dark .el-switch__core,
-html.dark .el-switch__core .el-switch__action {
- border-radius: 0;
-}
-html.dark .el-switch__core .el-switch__action {
- background-color: var(--ap-text);
-}
-
-.el-progress-bar__outer,
-.el-progress-bar__inner {
- border-radius: 0 !important;
-}
-
-html.dark .el-drawer {
- border-left: 1px solid var(--ap-line);
-}
-.el-drawer__header {
- margin-bottom: 0 !important;
- padding: 0 16px !important;
- height: 48px;
- border-bottom: 1px solid var(--ap-line);
- background: var(--ap-panel-high);
-}
-.el-drawer__title,
-.el-dialog__title,
-.el-message-box__title {
- font-family: var(--ap-font-head);
- font-weight: 700;
-}
-html.dark .el-dialog,
-html.dark .el-message-box {
- border: 1px solid var(--ap-faint);
-}
-
-/* ---------- 正文 ---------- */
-
-/* Markdown 渲染(分析报告、Chat 回复、skill 预览、CONTEXT.md 预览):长段中文用无衬线字体 */
+/* Markdown 渲染(Chat 回复、skill 预览、CONTEXT.md 预览) */
.markdown-body {
- font-family: var(--ap-font-sans);
font-size: 14px;
- line-height: 1.75;
+ line-height: 1.7;
word-break: break-word;
- color: var(--ap-text);
}
.markdown-body > :first-child {
margin-top: 0;
@@ -270,21 +22,17 @@ html.dark .el-message-box {
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
- margin: 1.1em 0 0.5em;
- font-family: var(--ap-font-head);
- font-weight: 700;
+ margin: 1em 0 0.5em;
+ font-weight: 600;
}
.markdown-body h1 {
- font-size: 1.45em;
+ font-size: 1.5em;
}
.markdown-body h2 {
- padding-bottom: 0.25em;
- border-bottom: 1px solid var(--ap-line);
- font-size: 1.25em;
+ font-size: 1.3em;
}
.markdown-body h3 {
font-size: 1.1em;
- color: var(--ap-brand);
}
.markdown-body p,
.markdown-body ul,
@@ -298,23 +46,17 @@ html.dark .el-message-box {
.markdown-body ol {
padding-left: 1.5em;
}
-.markdown-body strong {
- color: #fff;
-}
-.markdown-body a {
- color: var(--ap-brand);
-}
.markdown-body code {
padding: 0.1em 0.3em;
- background: var(--ap-panel-high);
- font-family: var(--ap-font-mono);
- font-size: 0.88em;
+ border-radius: 3px;
+ background: var(--el-fill-color);
+ font-size: 0.9em;
}
.markdown-body pre {
padding: 0.6em 0.8em;
overflow: auto;
- border: 1px solid var(--ap-line);
- background: var(--ap-sunken);
+ border-radius: 4px;
+ background: var(--el-fill-color-light);
}
.markdown-body pre code {
padding: 0;
@@ -322,51 +64,14 @@ html.dark .el-message-box {
}
.markdown-body blockquote {
padding-left: 0.8em;
- border-left: 3px solid var(--ap-brand);
- color: var(--ap-muted);
+ border-left: 3px solid var(--el-border-color);
+ color: var(--el-text-color-secondary);
}
.markdown-body table {
border-collapse: collapse;
- font-family: var(--ap-font-mono);
- font-size: 12px;
}
.markdown-body th,
.markdown-body td {
- padding: 0.35em 0.7em;
- border: 1px solid var(--ap-line);
-}
-.markdown-body th {
- background: var(--ap-panel-high);
- color: var(--ap-muted);
- font-weight: 500;
-}
-.markdown-body hr {
- border: 0;
- border-top: 1px solid var(--ap-line);
-}
-
-/* 逐行差异(新闻修订、skill 版本) */
-.diff-add {
- background: color-mix(in srgb, var(--ap-up) 14%, transparent);
-}
-.diff-del {
- background: color-mix(in srgb, var(--ap-down) 14%, transparent);
- color: var(--ap-muted);
- text-decoration: line-through;
-}
-
-/* 折叠面板:标题和内容留出内边距,标题过长时截断 */
-.el-collapse-item__header {
- gap: 8px;
- padding: 0 10px 0 12px;
-}
-.el-collapse-item__title {
- flex: 1;
- min-width: 0;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
-}
-.el-collapse-item__content {
- padding: 0 12px 12px;
+ padding: 0.3em 0.6em;
+ border: 1px solid var(--el-border-color);
}
diff --git a/web/src/styles/palette.ts b/web/src/styles/palette.ts
deleted file mode 100644
index 0b8ccf4..0000000
--- a/web/src/styles/palette.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * 全站配色,取自 Stitch 稿 code.html 的 Tailwind token(screen.png 取样核实)。
- * uno.config.ts 用它生成 ap-* 类名和 --ap-* CSS 变量;KLineChart 和新闻 iframe 读不到 CSS 变量,直接引用这里的值。
- */
-export const PALETTE = {
- bg: "#0a141f",
- sunken: "#050f19",
- panelLow: "#131c27",
- panel: "#17202b",
- panelHigh: "#212b36",
- panelHighest: "#2c3641",
- line: "#3c4a40",
- faint: "#859489",
- text: "#d9e3f3",
- muted: "#bbcabd",
- brand: "#ffd162",
- up: "#45e89b",
- down: "#ffb4ab",
- warn: "#ff8f1f",
- // K 线柱体需要更饱和的涨跌色
- candleUp: "#0ecb81",
- candleDown: "#f6465d"
-} as const
diff --git a/web/src/utils/text.ts b/web/src/utils/text.ts
index b50431c..a7ecd2b 100644
--- a/web/src/utils/text.ts
+++ b/web/src/utils/text.ts
@@ -4,12 +4,6 @@ export function formatTime(value: string | null | undefined, pattern = "MM-DD HH
return value ? dayjs(value).format(pattern) : "-"
}
-/** 两个时间点之间的耗时,如「1m 52s」 */
-export function formatDuration(from: string, to: string) {
- const seconds = Math.round((new Date(to).getTime() - new Date(from).getTime()) / 1000)
- return seconds >= 60 ? `${Math.floor(seconds / 60)}m ${seconds % 60}s` : `${seconds}s`
-}
-
/** HTML 转纯文本行;DOMParser 解析的文档不会执行脚本 */
export function htmlToLines(html: string): string[] {
const marked = html.replace(/
|<\/(?:p|div|li|h\d)>/gi, "\n")
diff --git a/web/types/components.d.ts b/web/types/components.d.ts
index 20712dc..49b94af 100644
--- a/web/types/components.d.ts
+++ b/web/types/components.d.ts
@@ -12,40 +12,36 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
ElAlert: typeof import('element-plus/es')['ElAlert']
+ ElAside: typeof import('element-plus/es')['ElAside']
ElBadge: typeof import('element-plus/es')['ElBadge']
ElButton: typeof import('element-plus/es')['ElButton']
ElCard: typeof import('element-plus/es')['ElCard']
- ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCheckboxButton: typeof import('element-plus/es')['ElCheckboxButton']
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
- ElCollapse: typeof import('element-plus/es')['ElCollapse']
- ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
+ ElContainer: typeof import('element-plus/es')['ElContainer']
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElDivider: typeof import('element-plus/es')['ElDivider']
ElDrawer: typeof import('element-plus/es')['ElDrawer']
- ElDropdown: typeof import('element-plus/es')['ElDropdown']
- ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
- ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
- ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
- ElIcon: typeof import('element-plus/es')['ElIcon']
+ ElHeader: typeof import('element-plus/es')['ElHeader']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElLink: typeof import('element-plus/es')['ElLink']
+ ElMain: typeof import('element-plus/es')['ElMain']
+ ElMenu: typeof import('element-plus/es')['ElMenu']
+ ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
ElOptionGroup: typeof import('element-plus/es')['ElOptionGroup']
- ElPagination: typeof import('element-plus/es')['ElPagination']
ElPopover: typeof import('element-plus/es')['ElPopover']
ElProgress: typeof import('element-plus/es')['ElProgress']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
- ElScrollbar: typeof import('element-plus/es')['ElScrollbar']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSelectV2: typeof import('element-plus/es')['ElSelectV2']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
@@ -55,13 +51,11 @@ declare module 'vue' {
ElTabs: typeof import('element-plus/es')['ElTabs']
ElTag: typeof import('element-plus/es')['ElTag']
ElTooltip: typeof import('element-plus/es')['ElTooltip']
- ElTree: typeof import('element-plus/es')['ElTree']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
- SkillTree: typeof import('./../src/components/SkillTree.vue')['default']
- SkillVersionDrawer: typeof import('./../src/components/SkillVersionDrawer.vue')['default']
}
export interface GlobalDirectives {
+ vInfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll']
vLoading: typeof import('element-plus/es')['ElLoadingDirective']
}
}
diff --git a/web/types/router.d.ts b/web/types/router.d.ts
index 2fc9c9e..ac86a84 100644
--- a/web/types/router.d.ts
+++ b/web/types/router.d.ts
@@ -1,9 +1,7 @@
-import type { Component } from "vue"
import "vue-router"
declare module "vue-router" {
interface RouteMeta {
title?: string
- icon?: Component
}
}
diff --git a/web/uno.config.ts b/web/uno.config.ts
index 93405e5..35c8f2d 100644
--- a/web/uno.config.ts
+++ b/web/uno.config.ts
@@ -1,10 +1,4 @@
import { defineConfig, presetAttributify, presetWind3 } from "unocss"
-import { PALETTE } from "./src/styles/palette"
-
-// camelCase → kebab-case:类名写 bg-ap-panel-high,CSS 变量为 --ap-panel-high
-const kebab = (name: string) => name.replace(/[A-Z]/g, c => `-${c.toLowerCase()}`)
-const apColors = Object.fromEntries(Object.entries(PALETTE).map(([k, v]) => [kebab(k), v]))
-const CJK = `"PingFang SC", "Microsoft YaHei", "Noto Sans SC"`
export default defineConfig({
// 预设
@@ -19,24 +13,6 @@ export default defineConfig({
important: "#app"
})
],
- theme: {
- colors: { ap: apColors },
- fontFamily: {
- // 界面、表格、数字
- mono: `"JetBrains Mono Variable", ui-monospace, ${CJK}, monospace`,
- // 标题
- head: `"Space Grotesk Variable", ${CJK}, sans-serif`,
- // 正文类:新闻、Markdown、Chat 回复
- sans: `-apple-system, BlinkMacSystemFont, "Segoe UI", ${CJK}, sans-serif`
- }
- },
- preflights: [{
- getCSS: ({ theme }) => {
- const fonts = (theme as { fontFamily: Record }).fontFamily
- return `:root{${Object.entries(apColors).map(([k, v]) => `--ap-${k}:${v};`).join("")}`
- + `--ap-font-mono:${fonts.mono};--ap-font-head:${fonts.head};--ap-font-sans:${fonts.sans};}`
- }
- }],
// 自定义规则
rules: [],
// 自定义快捷方式
@@ -44,8 +20,6 @@ export default defineConfig({
"wh-full": "w-full h-full",
"flex-center": "flex justify-center items-center",
"flex-x-center": "flex justify-center",
- "flex-y-center": "flex items-center",
- // 面板标题条里的标题
- "panel-title": "font-head text-[12px] font-bold tracking-wider text-ap-text"
+ "flex-y-center": "flex items-center"
}
})