feat: 币种输入旁实时显示交易所现价

Shared SymbolLivePrice polls /api/order_defaults on input with debounce; wired to trade, key monitor, trend, and key focus forms.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-05 00:42:44 +08:00
parent efe7a57e60
commit 3a740235ac
13 changed files with 273 additions and 14 deletions
+48
View File
@@ -1611,3 +1611,51 @@ html[data-theme="light"] .trade-policy-dir-lock {
border-color: #9ed4b8;
}
/* ── 币种输入实时现价 ── */
.symbol-live-price {
display: inline-flex;
align-items: center;
padding: 4px 10px;
border-radius: 8px;
font-size: 0.8rem;
font-weight: 600;
color: #8fc8ff;
background: rgba(31, 58, 90, 0.35);
border: 1px solid rgba(143, 200, 255, 0.22);
white-space: nowrap;
line-height: 1.35;
}
.symbol-live-price--ok {
color: #4cd97f;
border-color: rgba(76, 217, 127, 0.35);
background: rgba(76, 217, 127, 0.08);
}
.symbol-live-price--loading {
opacity: 0.75;
}
.symbol-live-price--err {
color: #e8a090;
border-color: rgba(232, 160, 144, 0.35);
}
.symbol-live-price-note {
font-size: 0.72rem;
color: #8892b0;
white-space: nowrap;
}
html[data-theme="light"] .symbol-live-price {
color: #1a4a7a;
background: #eef4fb;
border-color: #b8cfe8;
}
html[data-theme="light"] .symbol-live-price--ok {
color: #087a50;
background: #e8f8f0;
border-color: #9ed4b8;
}