diff --git a/src/api/baidu/mapQuote.ts b/src/api/baidu/mapQuote.ts index 608d16f..0c76384 100644 --- a/src/api/baidu/mapQuote.ts +++ b/src/api/baidu/mapQuote.ts @@ -50,7 +50,8 @@ function parseIntraday(result: BaiduQuotationResult): IntradayPoint[] { } function parseTrades(result: BaiduQuotationResult): TradeTick[] { - return (result.detailinfos ?? []).map((t) => ({ + // 接口 detailinfos 为旧→新(最新在末尾);翻转后最新在前,列表顶部展示 + return [...(result.detailinfos ?? [])].reverse().map((t) => ({ time: t.formatTime, price: toNum(t.price), volume: toNum(t.volume), diff --git a/src/components/quote/TradeTape.vue b/src/components/quote/TradeTape.vue index 0956173..4931399 100644 --- a/src/components/quote/TradeTape.vue +++ b/src/components/quote/TradeTape.vue @@ -7,10 +7,20 @@ 现手
-
+
{{ t.time }} {{ t.price.toFixed(2) }} - {{ t.volume }}{{ t.side }} + + {{ t.volume }} + + {{ t.side === 'B' ? '买' : '卖' }} + +
@@ -42,9 +52,10 @@ defineProps<{ .head, .row { display: grid; - grid-template-columns: 1fr 1fr 1fr; + grid-template-columns: 1fr 1fr 1.2fr; font-size: 12px; line-height: 1.8; + align-items: center; } .head { @@ -61,4 +72,21 @@ defineProps<{ .row span { font-variant-numeric: tabular-nums; } + +.vol-cell { + display: inline-flex; + align-items: center; + gap: 4px; +} + +.vol { + min-width: 2em; +} + +.side-tag { + --el-tag-border-radius: 4px; + height: 18px; + padding: 0 5px; + line-height: 16px; +}