From 6992b30312215edf7bdc9d7c6463d8a6e22df8de Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 11 Oct 2021 16:16:30 +0800 Subject: [PATCH 1/4] =?UTF-8?q?combo=E5=A2=9E=E5=8A=A0blur=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 2 ++ src/base/combination/combo.js | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index e92247d0c..25b8db40a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,6 @@ # 更新日志 +2.0(2021-100) +- combo增加window.blur事件触发隐藏 2.0(2021-09) - 支持自动watch - 支持h函数传递left、right,优化left_right_vertical_adapt布局的jsx写法 diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index fcb2690f3..8582bcbed 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -308,6 +308,7 @@ delete needHideWhenAnotherComboOpen[this.getName()]; BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); + BI.Widget._renderEngine.createElement(window).unbind("blur." + this.getName()); this.fireEvent(BI.Combo.EVENT_AFTER_HIDEVIEW); }, @@ -331,7 +332,10 @@ this.element.addClass(this.options.comboClass); BI.Widget._renderEngine.createElement(document).unbind("mousedown." + this.getName()).unbind("mousewheel." + this.getName()); + BI.Widget._renderEngine.createElement(window).unbind("blur." + this.getName()); + BI.Widget._renderEngine.createElement(document).bind("mousedown." + this.getName(), BI.bind(this._hideIf, this)).bind("mousewheel." + this.getName(), BI.bind(this._hideIf, this)); + BI.Widget._renderEngine.createElement(window).bind("blur." + this.getName(), BI.bind(this._hideIf, this)); this.fireEvent(BI.Combo.EVENT_AFTER_POPUPVIEW); }, @@ -553,7 +557,8 @@ .unbind("mousewheel." + this.getName()) .unbind("mouseenter." + this.getName()) .unbind("mousemove." + this.getName()) - .unbind("mouseleave." + this.getName()) + .unbind("mouseleave." + this.getName()); + BI.Widget._renderEngine.createElement(window) .unbind("blur." + this.getName()); BI.Resizers.remove(this.getName()); this.popupView && this.popupView._destroy(); From f3e7acf7695db4d0dedab9385a5b5175af09ce81 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 11 Oct 2021 21:37:28 +0800 Subject: [PATCH 2/4] =?UTF-8?q?combo=E5=A2=9E=E5=8A=A0blur=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/input/checkbox.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/less/base/single/input/checkbox.less b/src/less/base/single/input/checkbox.less index f3d0c15b5..c03f269ed 100644 --- a/src/less/base/single/input/checkbox.less +++ b/src/less/base/single/input/checkbox.less @@ -13,8 +13,8 @@ border: 2px solid transparent; border-top: 0; border-left: 0; - width: 6px; - height: 9px; + width: 4px; + height: 8px; .transform(rotate(45deg) scale(1) translate(-50%, -50%)); content: ''; } From 75e7c8f5c5149c44751a03f10bdd67ccc3d94994 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 11 Oct 2021 21:51:56 +0800 Subject: [PATCH 3/4] =?UTF-8?q?combo=E5=A2=9E=E5=8A=A0blur=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/less/base/single/input/checkbox.less | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/less/base/single/input/checkbox.less b/src/less/base/single/input/checkbox.less index c03f269ed..96507bfd2 100644 --- a/src/less/base/single/input/checkbox.less +++ b/src/less/base/single/input/checkbox.less @@ -13,8 +13,9 @@ border: 2px solid transparent; border-top: 0; border-left: 0; - width: 4px; - height: 8px; + width: 6px; + height: 9px; + .box-sizing(border-box); .transform(rotate(45deg) scale(1) translate(-50%, -50%)); content: ''; } From 1583d675c08e1bb975f2b18d5547d48b1dbdfab5 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 11 Oct 2021 22:30:50 +0800 Subject: [PATCH 4/4] =?UTF-8?q?combo=E5=A2=9E=E5=8A=A0blur=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 25b8db40a..74d3a0360 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,5 @@ # 更新日志 -2.0(2021-100) +2.0(2021-10) - combo增加window.blur事件触发隐藏 2.0(2021-09) - 支持自动watch