价格/百分比模式开仓按钮靠右;持仓上限红字移到预估风险下方。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-12 20:45:47 +08:00
parent ce22f8c7d6
commit bacb5fdde4
6 changed files with 44 additions and 16 deletions
@@ -1306,6 +1306,8 @@ function setOmFieldVisible(inputEl, show){
}
function toggleSltpMode(){
const mode = sltpModeEl ? sltpModeEl.value : "fixed_rr";
const levelsRow = document.querySelector("#add-order-form .om-row-levels");
if(levelsRow) levelsRow.setAttribute("data-sltp-mode", mode);
const slEl = document.getElementById("order-sl");
const tpEl = document.getElementById("order-tp");
const fixedRrEl = document.getElementById("order-fixed-rr");
+1 -1
View File
@@ -7,7 +7,7 @@
<script src="/static/autofill_guard.js?v=1"></script>
<link rel="stylesheet" href="/static/instance_theme_early.css?v=4">
<link rel="stylesheet" href="/static/account_risk_badge.css?v=4">
<link rel="stylesheet" href="/static/instance_page.css?v=14">
<link rel="stylesheet" href="/static/instance_page.css?v=15">
<link rel="stylesheet" href="/static/instance_theme.css?v=118">
<script src="/static/account_risk_badge.js?v=4"></script>
<script src="/static/open_submit_gate.js?v=1"></script>
+3 -1
View File
@@ -18,7 +18,7 @@
<link rel="apple-touch-icon" href="/static/icons/apple-touch-icon.png">
<link rel="manifest" href="/static/icons/manifest.webmanifest">
<title>{{ pwa_app_name }}</title>
<link rel="stylesheet" href="/static/instance_page.css?v=14">
<link rel="stylesheet" href="/static/instance_page.css?v=15">
<link rel="stylesheet" href="/static/instance_theme.css?v=118">
</head>
@@ -1812,6 +1812,8 @@ function setOmFieldVisible(inputEl, show){
}
function toggleSltpMode(){
const mode = sltpModeEl ? sltpModeEl.value : "fixed_rr";
const levelsRow = document.querySelector("#add-order-form .om-row-levels");
if(levelsRow) levelsRow.setAttribute("data-sltp-mode", mode);
const slEl = document.getElementById("order-sl");
const tpEl = document.getElementById("order-tp");
const fixedRrEl = document.getElementById("order-fixed-rr");
@@ -15,7 +15,7 @@
{{ order_leverage_fields() }}
</div>
<div class="om-row om-row-levels">
<div class="om-row om-row-levels" data-sltp-mode="fixed_rr">
<label class="om-field" id="om-field-sl">
<span class="om-field-lab">止损价格</span>
<input id="order-sl" name="sl" step="any" placeholder="必填" required>
@@ -24,8 +24,6 @@
<span class="om-field-lab">盈亏比</span>
<input id="order-fixed-rr" name="fixed_rr" type="number" min="0.01" step="0.01" placeholder="默认1.5" value="1.5" title="止盈距离=止损距离×盈亏比">
</label>
<button type="submit" class="om-submit{% if not can_trade %} is-blocked{% endif %}" id="om-submit-btn"{% if not can_trade %} disabled aria-disabled="true"{% endif %}>{{ open_position_button_label }}</button>
<span id="om-open-block-note" class="om-open-block-note"{% if can_trade or not (open_block_note|default('')) %} hidden{% endif %}>{% if not can_trade and (open_block_note|default('')) %}{{ open_block_note }}{% endif %}</span>
<label class="om-field" id="om-field-tp" style="display:none">
<span class="om-field-lab">止盈价格</span>
<input id="order-tp" name="tgt" step="any" placeholder="止盈价格">
@@ -42,6 +40,7 @@
{% from 'symbol_live_price_snippet.html' import symbol_live_price_hint %}
{{ symbol_live_price_hint('order-symbol-live-price', 'order-symbol', 'order-direction') }}
</div>
<button type="submit" class="om-submit{% if not can_trade %} is-blocked{% endif %}" id="om-submit-btn"{% if not can_trade %} disabled aria-disabled="true"{% endif %}>{{ open_position_button_label }}</button>
</div>
{% if not intraday_discipline %}