From 820df8c8a42d2183663b0c98d3bb87a99f49d722 Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 29 Aug 2022 17:04:08 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-11626=20feat:=20=E5=8D=8A=E9=80=89checkb?= =?UTF-8?q?ox=E6=94=AF=E6=8C=81=E5=8A=A8=E6=80=81=E5=AE=BD=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/button/icon/iconhalf/icon.half.js | 24 +++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/case/button/icon/iconhalf/icon.half.js b/src/case/button/icon/iconhalf/icon.half.js index 6a46b165e..f8c23afc4 100644 --- a/src/case/button/icon/iconhalf/icon.half.js +++ b/src/case/button/icon/iconhalf/icon.half.js @@ -7,20 +7,34 @@ BI.HalfButton = BI.inherit(BI.BasicButton, { _defaultConfig: function () { var conf = BI.HalfIconButton.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { - extraCls: "bi-half-button bi-high-light-border", - height: 14, + selected: false, width: 14, - selected: false + height: 14, + iconWidth: 14, + iconHeight: 14, }); }, + render: function () { + var o = this.options; + return { + type: "bi.center_adapt", + items: [{ + type: "bi.default", + cls: "bi-half-button bi-high-light-border", + width: o.iconWidth, + height: o.iconHeight, + }], + }; + }, + doClick: function () { BI.HalfButton.superclass.doClick.apply(this, arguments); - if(this.isValid()) { + if (this.isValid()) { this.fireEvent(BI.HalfButton.EVENT_CHANGE); } } }); BI.HalfButton.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.half_button", BI.HalfButton); \ No newline at end of file +BI.shortcut("bi.half_button", BI.HalfButton);