diff --git a/changelog.md b/changelog.md index 02c590507..251859dd5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,6 @@ # 更新日志 2.0(2019-12) +- 修复多层级单选下拉树主动设置container后搜索面板弹出问题 - bi.search_editor支持搜索中间含有空格的字符串 - 修复了监听日期下拉框before_popup_view事件,调用setMinDate无效的问题 - 修复了数值滑块逆向排列滑块后populate显示效果不对的问题 diff --git a/dist/utils.js b/dist/utils.js index 131adbefe..42ec5f109 100644 --- a/dist/utils.js +++ b/dist/utils.js @@ -12362,6 +12362,7 @@ if (!_global.BI) { _purgeRef: function () { if (this.options.ref) { this.options.ref.call(null); + this.options.ref = null; } }, diff --git a/src/base/combination/combo.js b/src/base/combination/combo.js index 0a963ce8c..64ec1385a 100644 --- a/src/base/combination/combo.js +++ b/src/base/combination/combo.js @@ -518,6 +518,7 @@ BI.Combo = BI.inherit(BI.Widget, { .unbind("mousemove." + this.getName()) .unbind("mouseleave." + this.getName()); BI.Resizers.remove(this.getName()); + this.popupView && this.popupView._destroy(); } }); BI.Combo.EVENT_TRIGGER_CHANGE = "EVENT_TRIGGER_CHANGE"; diff --git a/src/base/combination/switcher.js b/src/base/combination/switcher.js index d6c1f1300..e3a73bcda 100644 --- a/src/base/combination/switcher.js +++ b/src/base/combination/switcher.js @@ -271,10 +271,6 @@ BI.Switcher = BI.inherit(BI.Widget, { empty: function () { this.popupView && this.popupView.empty(); - }, - - destroy: function () { - BI.Switcher.superclass.destroy.apply(this, arguments); } }); BI.Switcher.EVENT_EXPAND = "EVENT_EXPAND"; diff --git a/src/core/ob.js b/src/core/ob.js index 4cf532c5a..7bafa8a1e 100644 --- a/src/core/ob.js +++ b/src/core/ob.js @@ -81,6 +81,7 @@ _purgeRef: function () { if (this.options.ref) { this.options.ref.call(null); + this.options.ref = null; } }, diff --git a/src/core/widget.js b/src/core/widget.js index 09dfd5573..e5dbbe0fc 100644 --- a/src/core/widget.js +++ b/src/core/widget.js @@ -445,6 +445,7 @@ __d: function () { this.beforeDestroy && this.beforeDestroy(); + this.beforeDestroy = null; BI.each(this._children, function (i, widget) { widget && widget._unMount && widget._unMount(); }); @@ -452,6 +453,7 @@ this._parent = null; this._isMounted = false; this.destroyed && this.destroyed(); + this.destroyed = null; }, _unMount: function () { diff --git a/src/widget/intervalslider/intervalslider.js b/src/widget/intervalslider/intervalslider.js index 1c3818252..a90a65f81 100644 --- a/src/widget/intervalslider/intervalslider.js +++ b/src/widget/intervalslider/intervalslider.js @@ -527,7 +527,7 @@ BI.IntervalSlider = BI.inherit(BI.Single, { this.labelTwo.setValue(this.max); this._setAllPosition(0, 100); } - this._resetLabelPosition(); + this._resetLabelPosition(this.valueOne > this.valueTwo); } } }); diff --git a/src/widget/multilayerselecttree/multilayerselecttree.combo.js b/src/widget/multilayerselecttree/multilayerselecttree.combo.js index 549f3a626..410e4320c 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.combo.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.combo.js @@ -64,6 +64,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { return { type: "bi.combo", container: o.container, + destroyWhenHide: o.destroyWhenHide, adjustLength: 2, ref: function (_ref) { self.combo = _ref; @@ -104,6 +105,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { return { el: { type: "bi.multilayer_select_tree_trigger", + container: o.container, allowInsertValue: o.allowInsertValue, allowSearchValue: o.allowSearchValue, allowEdit: o.allowEdit, @@ -152,8 +154,14 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { } }] }, + toggle: !o.allowEdit, hideChecker: function (e) { - return self.triggerBtn.element.find(e.target).length === 0; + // 新增传配置container后对应hideChecker的修改 + // IE11下,popover(position: fixed)下放置下拉控件(position: fixed), 滚动的时候会异常卡顿 + // 通过container参数将popup放置于popover之外解决此问题, 其他下拉控件由于元素少或者有分页,所以 + // 卡顿不明显, 先在此做尝试, 并在FineUI特殊处理待解决文档中标记跟踪 + return (o.container && self.trigger.getSearcher().getView().element.find(e.target).length > 0) ? false : self.triggerBtn.element.find(e.target).length === 0; + }, listeners: [{ eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, diff --git a/src/widget/multilayerselecttree/multilayerselecttree.trigger.js b/src/widget/multilayerselecttree/multilayerselecttree.trigger.js index 67e38591a..b112061f8 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.trigger.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.trigger.js @@ -30,6 +30,12 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.searcher = this; }, + masker: BI.isNotNull(o.container) ? { + offset: {}, + container: o.container + } : { + offset: {} + }, isAutoSearch: false, el: { type: "bi.state_editor", diff --git a/src/widget/multilayersingletree/multilayersingletree.combo.js b/src/widget/multilayersingletree/multilayersingletree.combo.js index 8b6d145e1..b4218db00 100644 --- a/src/widget/multilayersingletree/multilayersingletree.combo.js +++ b/src/widget/multilayersingletree/multilayersingletree.combo.js @@ -67,6 +67,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { return { type: "bi.combo", container: o.container, + destroyWhenHide: o.destroyWhenHide, adjustLength: 2, ref: function (_ref) { self.combo = _ref; @@ -107,6 +108,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { return { el: { type: "bi.multilayer_single_tree_trigger", + container: o.container, allowInsertValue: o.allowInsertValue, allowSearchValue: o.allowSearchValue, allowEdit: o.allowEdit, @@ -155,8 +157,13 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { } }] }, + toggle: !o.allowEdit, hideChecker: function (e) { - return self.triggerBtn.element.find(e.target).length === 0; + // 新增传配置container后对应hideChecker的修改 + // IE11下,popover(position: fixed)下放置下拉控件(position: fixed), 滚动的时候会异常卡顿 + // 通过container参数将popup放置于popover之外解决此问题, 其他下拉控件由于元素少或者有分页,所以 + // 卡顿不明显, 先在此做尝试, 并在FineUI特殊处理待解决文档中标记跟踪 + return (o.container && self.trigger.getSearcher().getView().element.find(e.target).length > 0) ? false : self.triggerBtn.element.find(e.target).length === 0 }, listeners: [{ eventName: BI.Combo.EVENT_AFTER_HIDEVIEW, diff --git a/src/widget/multilayersingletree/multilayersingletree.trigger.js b/src/widget/multilayersingletree/multilayersingletree.trigger.js index 514bd7760..c92a1d416 100644 --- a/src/widget/multilayersingletree/multilayersingletree.trigger.js +++ b/src/widget/multilayersingletree/multilayersingletree.trigger.js @@ -30,6 +30,12 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { ref: function () { self.searcher = this; }, + masker: BI.isNotNull(o.container) ? { + offset: {}, + container: o.container + } : { + offset: {} + }, isAutoSearch: false, el: { type: "bi.state_editor",