总览持仓列去掉 Put/Call 红绿色,改回中性文案。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-04 21:23:02 +08:00
parent 7c5b652b9b
commit 1b0acfdb08
4 changed files with 4 additions and 28 deletions
+2 -18
View File
@@ -77,16 +77,6 @@
);
}
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";
@@ -108,11 +98,8 @@
const list = brief || [];
if (!list.length) {
if (cond) {
const sideCls = optSideClass(cond.opt_type, "");
return (
'<div class="overview-cond-wait' +
(sideCls ? " " + sideCls : "") +
'">' +
'<div class="overview-cond-wait">' +
'<div class="overview-cond-wait-line">' +
escapeHtml(condWaitLine(cond)) +
"</div></div>"
@@ -126,11 +113,8 @@
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 class="' +
sideCls +
'">' +
"<li>" +
escapeHtml(id) +
" · " +
sheets +