From 7a8b9877fe8b54d3fdde4bc1bcb2615abcc038d3 Mon Sep 17 00:00:00 2001 From: Claire <1119518763@qq.com> Date: Thu, 14 Apr 2022 11:16:18 +0800 Subject: [PATCH] =?UTF-8?q?BI-104282=20fix:switch=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=96=87=E5=AD=97=E6=98=BE=E7=A4=BA=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=A2=9E=E5=8A=A0selected=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/button/switch.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/case/button/switch.js b/src/case/button/switch.js index 0c7c199fb..ba4de99d2 100644 --- a/src/case/button/switch.js +++ b/src/case/button/switch.js @@ -36,14 +36,14 @@ BI.Switch = BI.inherit(BI.BasicButton, { width: 12, height: 12, top: tgap, - left: this.options.selected ? 28 : 4 + left: o.selected ? 28 : 4 }, { type: "bi.label", text: BI.i18nText("BI-Basic_Simple_Open"), cls: "content-tip", left: 8, top: tgap - 2, - invisible: !o.showTip, + invisible: !(o.showTip && o.selected), ref: function (ref) { self.openTip = ref; } @@ -53,7 +53,7 @@ BI.Switch = BI.inherit(BI.BasicButton, { cls: "content-tip", right: 8, top: tgap - 2, - invisible: !o.showTip, + invisible: !(o.showTip && !o.selected), ref: function (ref) { self.closeTip = ref; }