From c4d94ab90e2d0f2fc61c0e44ac25af02af189f7f Mon Sep 17 00:00:00 2001 From: zsmj1994 Date: Sat, 20 Feb 2021 09:47:44 +0800 Subject: [PATCH] =?UTF-8?q?DEC-17238=20fix:=20=E4=BF=AE=E5=A4=8DBI.PopupVi?= =?UTF-8?q?ew=20=20maxWidth=E5=B1=9E=E6=80=A7=E4=B8=BA"auto"=E6=88=96null?= =?UTF-8?q?=E7=9A=84=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/layer/layer.popup.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/base/layer/layer.popup.js b/src/base/layer/layer.popup.js index 9c6eb0536..7a570810a 100644 --- a/src/base/layer/layer.popup.js +++ b/src/base/layer/layer.popup.js @@ -52,14 +52,14 @@ BI.PopupView = BI.inherit(BI.Widget, { }; this.element.css({ "z-index": BI.zIndex_popup, - "min-width": o.minWidth / BI.pixRatio + BI.pixUnit, - "max-width": o.maxWidth / BI.pixRatio + BI.pixUnit - }).bind({click: fn}); + "min-width": BI.isNumeric(o.minWidth) ? (o.minWidth / BI.pixRatio + BI.pixUnit) : o.minWidth, + "max-width": BI.isNumeric(o.maxWidth) ? (o.maxWidth / BI.pixRatio + BI.pixUnit) : o.maxWidth + }).bind({ click: fn }); this.element.bind("mousewheel", fn); - o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn}); - o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop}); + o.stopPropagation && this.element.bind({ mousedown: fn, mouseup: fn, mouseover: fn }); + o.stopEvent && this.element.bind({ mousedown: stop, mouseup: stop, mouseover: stop }); this.tool = this._createTool(); this.tab = this._createTab(); this.view = this._createView(); @@ -94,9 +94,9 @@ BI.PopupView = BI.inherit(BI.Widget, { _createView: function () { var o = this.options; - this.button_group = BI.createWidget(o.el, {type: "bi.button_group", value: o.value}); + this.button_group = BI.createWidget(o.el, { type: "bi.button_group", value: o.value }); this.button_group.element.css({ - "min-height": o.minHeight / BI.pixRatio + BI.pixUnit, + "min-height": BI.isNumeric(o.minHeight) ? (o.minHeight / BI.pixRatio + BI.pixUnit) : o.minHeight, "padding-top": o.innerVGap / BI.pixRatio + BI.pixUnit, "padding-bottom": o.innerVGap / BI.pixRatio + BI.pixUnit }); @@ -162,7 +162,7 @@ BI.PopupView = BI.inherit(BI.Widget, { toolHeight = ((this.tool && this.tool.attr("height")) || 24) * ((this.tool && this.tool.isVisible()) ? 1 : 0); var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap; this.view.resetHeight ? this.view.resetHeight(resetHeight) : - this.view.element.css({"max-height": resetHeight / BI.pixRatio + BI.pixUnit}); + this.view.element.css({ "max-height": resetHeight / BI.pixRatio + BI.pixUnit }); }, setValue: function (selectedValues) {