diff --git a/lib/common/static/options_panel.js b/lib/common/static/options_panel.js
index 14f79dc..b546ea1 100644
--- a/lib/common/static/options_panel.js
+++ b/lib/common/static/options_panel.js
@@ -1570,7 +1570,8 @@
'" +
'" +
+ '" min="0.1" step="0.1" value="' + mult +
+ '" autocomplete="off" inputmode="decimal" data-lpignore="true" data-1p-ignore="true">' +
'" +
@@ -1790,14 +1791,14 @@
});
container.querySelectorAll(".opt-pos-profit-exit-enabled").forEach(function (cb) {
cb.addEventListener("click", function (e) { e.stopPropagation(); });
- cb.addEventListener("change", function () {
- const row = cb.closest(".opt-profit-exit-pos-row");
- const multInp = row && row.querySelector(".opt-pos-profit-exit-mult");
- if (multInp) multInp.disabled = !cb.checked;
- });
});
container.querySelectorAll(".opt-pos-profit-exit-mult").forEach(function (inp) {
+ // 倍数随时可改;「开启/应用」只控制是否监控,不再因未勾选而 disabled
+ inp.disabled = false;
+ inp.removeAttribute("readonly");
inp.addEventListener("click", function (e) { e.stopPropagation(); });
+ inp.addEventListener("mousedown", function (e) { e.stopPropagation(); });
+ inp.addEventListener("focus", function (e) { e.stopPropagation(); });
inp.addEventListener("keydown", function (e) {
if (e.key === "Enter") {
e.preventDefault();
@@ -1906,7 +1907,10 @@
const mode = btn && btn.getAttribute("data-mode");
let enabled = !!(enabledEl && enabledEl.checked);
if (mode === "cancel") enabled = false;
- if (mode === "apply") enabled = true;
+ if (mode === "apply") {
+ enabled = true;
+ if (enabledEl) enabledEl.checked = true;
+ }
let mult = 1;
if (enabled) {
mult = parseFloat(multEl ? multEl.value : "1");
@@ -2518,12 +2522,12 @@
const peCb = document.getElementById("opt-profit-exit-enabled");
const peMult = document.getElementById("opt-profit-exit-mult");
if (!peCb || !peMult) return;
- function sync() {
- peMult.disabled = !peCb.checked;
+ // 倍数始终可手输;勾选只决定开仓是否带上翻倍出场
+ peMult.disabled = false;
+ peMult.removeAttribute("readonly");
+ peCb.addEventListener("change", function () {
if (peCb.checked && (!peMult.value || Number(peMult.value) <= 0)) peMult.value = "1";
- }
- peCb.addEventListener("change", sync);
- sync();
+ });
})();
document.querySelectorAll('input[name="opt-size-mode"]').forEach(function (r) {
diff --git a/lib/options/templates/options_panel.html b/lib/options/templates/options_panel.html
index 29b2422..91261e8 100644
--- a/lib/options/templates/options_panel.html
+++ b/lib/options/templates/options_panel.html
@@ -132,7 +132,7 @@
翻倍出场
-
1倍=盈利等于权利金(可回收≥2×权利金);可开可关,与目标位并行
@@ -350,4 +350,4 @@
-
+