总览报价与卡片右对齐并上移北京时间,标题下移,持仓列 Put 红 Call 绿。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-04 20:10:22 +08:00
parent dcee212434
commit a70d2703c9
4 changed files with 90 additions and 68 deletions
+18 -2
View File
@@ -77,6 +77,16 @@
);
}
function optSideClass(optType, instId) {
const t = String(optType || "").toUpperCase();
if (t === "P") return "opt-side-put";
if (t === "C") return "opt-side-call";
const id = String(instId || "").toUpperCase();
if (id.indexOf("-P-") >= 0 || id.slice(-2) === "-P") return "opt-side-put";
if (id.indexOf("-C-") >= 0 || id.slice(-2) === "-C") return "opt-side-call";
return "";
}
function condWaitLine(cond) {
if (!cond) return "条件单占用";
const put = String(cond.opt_type || "").toUpperCase() !== "C";
@@ -98,8 +108,11 @@
const list = brief || [];
if (!list.length) {
if (cond) {
const sideCls = optSideClass(cond.opt_type, "");
return (
'<div class="overview-cond-wait">' +
'<div class="overview-cond-wait' +
(sideCls ? " " + sideCls : "") +
'">' +
'<div class="overview-cond-wait-line">' +
escapeHtml(condWaitLine(cond)) +
"</div></div>"
@@ -113,8 +126,11 @@
const id = p.inst_id || "";
const sheets = escapeHtml(String(p.sheets != null ? p.sheets : "—"));
const fromCond = tagOpen && (!opened || opened === id);
const sideCls = optSideClass(p.opt_type, id);
return (
"<li>" +
'<li class="' +
sideCls +
'">' +
escapeHtml(id) +
" · " +
sheets +