仓位管理支持多合约同时开轮

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-07-26 10:34:25 +08:00
parent 58d99259e8
commit 51be04e5d2
3 changed files with 138 additions and 203 deletions
+6 -24
View File
@@ -59,12 +59,6 @@
border-left-color: var(--accent); font-weight: 600;
}
.sidebar-nav .icon { font-size: 1.1rem; width: 22px; text-align: center; }
.nav-parent { position: relative; }
.nav-arrow { font-size: 0.65rem; margin-left: auto; transition: transform .2s; color: var(--sub); }
.nav-group.open .nav-arrow { transform: rotate(-180deg); }
.nav-children { display: none; }
.nav-group.open .nav-children { display: block; }
.nav-children a { padding-left: 48px !important; font-size: 0.84rem !important; }
.sidebar-footer {
padding: 16px 20px; border-top: 1px solid var(--border);
}
@@ -201,20 +195,12 @@
<aside class="sidebar">
<div class="sidebar-logo">📊 期货量化</div>
<nav class="sidebar-nav">
<div class="nav-group{% if active_nav in ('contracts', 'positions') %} open{% endif %}" id="nav-market">
<a href="/contracts/" class="nav-parent{% if active_nav in ('contracts', 'positions') %} active{% endif %}" onclick="toggleNavGroup(event, 'nav-market')">
<span class="icon">📈</span> 行情数据
<span class="nav-arrow"></span>
</a>
<div class="nav-children">
<a href="/contracts/" class="{% if active_nav == 'contracts' %}active{% endif %}">
<span class="icon">📋</span> 合约列表
</a>
<a href="/positions/" class="{% if active_nav == 'positions' %}active{% endif %}">
<span class="icon">📐</span> 仓位管理
</a>
</div>
</div>
<a href="/contracts/" class="{% if active_nav == 'contracts' %}active{% endif %}">
<span class="icon">📈</span> 行情数据
</a>
<a href="/positions/" class="{% if active_nav == 'positions' %}active{% endif %}">
<span class="icon">📐</span> 仓位管理
</a>
<a href="/admin/" class="{% if active_nav == 'admin' %}active{% endif %}">
<span class="icon">⚙️</span> 系统管理
</a>
@@ -278,10 +264,6 @@ function closeDrawer() {
document.getElementById('drawer').classList.remove('show');
if (activeRow) { activeRow.classList.remove('active'); activeRow = null; }
}
function toggleNavGroup(e, id) {
e.preventDefault();
document.getElementById(id).classList.toggle('open');
}
</script>
</body>
</html>