Browse Source

Pull request #1899: DEC-18525 单选下拉框popup高度计算错误导致遮挡

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

* commit '5be61d2478e5ab6cb66c2a7778a4214a0660d91c':
  DEC-18525 fix: 单选下拉框popup高度计算错误导致遮挡
es6
Teller 4 years ago
parent
commit
a0857d2ae6
  1. 8
      src/widget/singleselect/singleselect.list.js
  2. 8
      src/widget/singleselect/singleselect.loader.js

8
src/widget/singleselect/singleselect.list.js

@ -7,6 +7,10 @@
*/
BI.SingleSelectList = BI.inherit(BI.Widget, {
_constants: {
itemHeight: 24
},
_defaultConfig: function () {
return BI.extend(BI.SingleSelectList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-select-list",
@ -61,7 +65,7 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
items: o.allowNoSelect ? BI.LogicFactory.createLogicItemsByDirection(o.direction, {
type: "bi.single_select_item",
cls: "bi-list-item-active",
height: 24,
height: this._constants.itemHeight,
forceNotSelected: true,
text: BI.i18nText("BI-Basic_No_Select"),
ref: function (_ref) {
@ -116,7 +120,7 @@ BI.SingleSelectList = BI.inherit(BI.Widget, {
resetHeight: function (h) {
this.list.resetHeight ? this.list.resetHeight(h) :
this.list.element.css({"max-height": h / BI.pixRatio + BI.pixUnit});
this.list.element.css({"max-height": (h - (this.options.allowNoSelect ? this._constants.itemHeight : 0)) / BI.pixRatio + BI.pixUnit});
},
setNotSelectedValue: function () {

8
src/widget/singleselect/singleselect.loader.js

@ -6,6 +6,10 @@
*/
BI.SingleSelectLoader = BI.inherit(BI.Widget, {
_constants: {
itemVgap: 5
},
_defaultConfig: function () {
return BI.extend(BI.SingleSelectLoader.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-single-select-loader",
@ -92,7 +96,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
type: "bi.vertical",
element: this,
items: [this.button_group],
vgap: 5
vgap: this._constants.itemVgap
});
this.button_group.on(BI.Controller.EVENT_CHANGE, function () {
@ -151,7 +155,7 @@ BI.SingleSelectLoader = BI.inherit(BI.Widget, {
},
resetHeight: function (h) {
this.button_group.resetHeight(h);
this.button_group.resetHeight(h - this._constants.itemVgap * 2);
},
resetWidth: function (w) {

Loading…
Cancel
Save