Browse Source

Pull request #2223: 无JIRA任务 combo增加blur事件

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit '1583d675c08e1bb975f2b18d5547d48b1dbdfab5':
  combo增加blur事件
  combo增加blur事件
  combo增加blur事件
  combo增加blur事件
es6
guy 3 years ago
parent
commit
30cb548260
  1. 2
      changelog.md
  2. 7
      src/base/combination/combo.js
  3. 1
      src/less/base/single/input/checkbox.less

2
changelog.md

@ -1,4 +1,6 @@
# 更新日志
2.0(2021-10)
- combo增加window.blur事件触发隐藏
2.0(2021-09)
- 支持自动watch
- 支持h函数传递left、right,优化left_right_vertical_adapt布局的jsx写法

7
src/base/combination/combo.js

@ -310,6 +310,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);
},
@ -333,7 +334,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);
},
@ -555,7 +559,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();

1
src/less/base/single/input/checkbox.less

@ -15,6 +15,7 @@
border-left: 0;
width: 6px;
height: 9px;
.box-sizing(border-box);
.transform(rotate(45deg) scale(1) translate(-50%, -50%));
content: '';
}

Loading…
Cancel
Save