From 1373735dcecd84e732c4f5cff9d109b7c72f10fe Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 29 Aug 2022 15:25:24 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A0JIRA=20fix:=20nor=5Fbar=20?= =?UTF-8?q?=E5=A4=8D=E9=80=89=E4=B8=8B=E6=8B=89=E6=A1=86=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E7=AE=AD=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widget/multiselect/multiselect.combo.less | 8 +++++-- .../multiselect/multiselect.combo.nobar.js | 22 ++++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/less/widget/multiselect/multiselect.combo.less b/src/less/widget/multiselect/multiselect.combo.less index 0399dd67a..fb8942963 100644 --- a/src/less/widget/multiselect/multiselect.combo.less +++ b/src/less/widget/multiselect/multiselect.combo.less @@ -1,9 +1,12 @@ @import "../../index.less"; + @val: transform .3s ease; -.bi-multi-select-combo{ - & .multi-select-trigger-icon-button{ + +.bi-multi-select-combo, .bi-multi-select-combo-no-bar { + & .multi-select-trigger-icon-button { font-size: @font-size-16; } + // 此combo的trigger_button是absolute上去的,与bi-combo在同一层级,独立写一下 & .bi-combo.bi-combo-popup + .bi-trigger-icon-button { & .x-icon { @@ -11,6 +14,7 @@ .transition(@val); } } + & .bi-combo + .bi-trigger-icon-button { & .x-icon { .rotate(0deg); diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index 0fe10f947..b06a40662 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -174,7 +174,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { value: o.value }, hideChecker: function (e) { - return self.numberCounter.element.find(e.target).length === 0; + return triggerBtn.element.find(e.target).length === 0 && self.numberCounter.element.find(e.target).length === 0; } }); @@ -199,6 +199,21 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { } }); + var triggerBtn = BI.createWidget({ + type: "bi.trigger_icon_button", + width: o.height, + height: o.height, + cls: "multi-select-trigger-icon-button" + }); + triggerBtn.on(BI.TriggerIconButton.EVENT_CHANGE, function () { + self.numberCounter.hideView(); + if (self.combo.isViewVisible()) { + self.combo.hideView(); + } else { + self.combo.showView(); + } + }); + this.numberCounter = BI.createWidget({ type: "bi.multi_select_check_selected_switcher", masker: { @@ -252,6 +267,11 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { right: 0, top: 0, bottom: 0 + }, { + el: triggerBtn, + right: 0, + top: 0, + bottom: 0 }, { el: { type: "bi.vertical_adapt", From 820df8c8a42d2183663b0c98d3bb87a99f49d722 Mon Sep 17 00:00:00 2001 From: zsmj Date: Mon, 29 Aug 2022 17:04:08 +0800 Subject: [PATCH 2/2] =?UTF-8?q?KERNEL-11626=20feat:=20=E5=8D=8A=E9=80=89ch?= =?UTF-8?q?eckbox=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);