Browse Source

Pull request #1772: DEC-17238 fix: 修复BI.PopupView maxWidth属性为"auto"或null的场景

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

* commit '8cddc41ad307f81639f78ec6ece8a0a1d1c8de6f':
  DEC-17238 fix: 修复BI.PopupView  maxWidth属性为"auto"或null的场景
es6
parent
commit
ea22ca5537
  1. 16
      src/base/layer/layer.popup.js

16
src/base/layer/layer.popup.js

@ -52,14 +52,14 @@ BI.PopupView = BI.inherit(BI.Widget, {
}; };
this.element.css({ this.element.css({
"z-index": BI.zIndex_popup, "z-index": BI.zIndex_popup,
"min-width": o.minWidth / BI.pixRatio + BI.pixUnit, "min-width": BI.isNumeric(o.minWidth) ? (o.minWidth / BI.pixRatio + BI.pixUnit) : o.minWidth,
"max-width": o.maxWidth / BI.pixRatio + BI.pixUnit "max-width": BI.isNumeric(o.maxWidth) ? (o.maxWidth / BI.pixRatio + BI.pixUnit) : o.maxWidth
}).bind({click: fn}); }).bind({ click: fn });
this.element.bind("mousewheel", fn); this.element.bind("mousewheel", fn);
o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn}); o.stopPropagation && this.element.bind({ mousedown: fn, mouseup: fn, mouseover: fn });
o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop}); o.stopEvent && this.element.bind({ mousedown: stop, mouseup: stop, mouseover: stop });
this.tool = this._createTool(); this.tool = this._createTool();
this.tab = this._createTab(); this.tab = this._createTab();
this.view = this._createView(); this.view = this._createView();
@ -94,9 +94,9 @@ BI.PopupView = BI.inherit(BI.Widget, {
_createView: function () { _createView: function () {
var o = this.options; 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({ 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-top": o.innerVGap / BI.pixRatio + BI.pixUnit,
"padding-bottom": 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); 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; var resetHeight = h - tbHeight - tabHeight - toolHeight - 2 * this.options.innerVGap;
this.view.resetHeight ? this.view.resetHeight(resetHeight) : 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) { setValue: function (selectedValues) {

Loading…
Cancel
Save