From 04f12cdf173243adf17a477a35657311ef33f6fb Mon Sep 17 00:00:00 2001 From: jian Date: Mon, 8 Jan 2024 12:48:22 +0800 Subject: [PATCH] =?UTF-8?q?BI-129824=20fix:=20=E6=8E=A7=E4=BB=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fineui/src/base/foundation/message.js | 4 ++-- packages/fineui/src/case/button/switch.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/fineui/src/base/foundation/message.js b/packages/fineui/src/base/foundation/message.js index 3847eba44..e96848c35 100644 --- a/packages/fineui/src/base/foundation/message.js +++ b/packages/fineui/src/base/foundation/message.js @@ -199,7 +199,9 @@ function _show(hasCancel, title, message, callback, config = {}) { items: [ { type: VerticalLayout.xtype, + cls: "bi-card bi-border-radius", width: 450, + hgap: 32, attributes: { tabIndex: 1, }, @@ -224,8 +226,6 @@ function _show(hasCancel, title, message, callback, config = {}) { } catch (e) { } }, - cls: "bi-card", - hgap: 32, items: [ { el: { diff --git a/packages/fineui/src/case/button/switch.js b/packages/fineui/src/case/button/switch.js index 68a5c556a..904f2607e 100644 --- a/packages/fineui/src/case/button/switch.js +++ b/packages/fineui/src/case/button/switch.js @@ -39,7 +39,7 @@ export class Switch extends BasicButton { width: 12, height: 12, top: tgap, - left: o.selected ? 28 : 4, + left: o.selected ? o.width - 16 : 4, }, { type: Label.xtype, @@ -78,7 +78,7 @@ export class Switch extends BasicButton { setSelected(v) { super.setSelected(...arguments); - this.layout.attr("items")[0].left = v ? 28 : 4; + this.layout.attr("items")[0].left = v ? this.options.width - 16 : 4; this.layout.resize(); this.options.showTip && this.openTip.setVisible(v); this.options.showTip && this.closeTip.setVisible(!v);