|
|
@ -10,9 +10,7 @@ BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
NORMAL: "normal", |
|
|
|
NORMAL: "normal", |
|
|
|
BIG: "big", |
|
|
|
BIG: "big", |
|
|
|
}, |
|
|
|
}, |
|
|
|
MAX_HEIGHT: 600, |
|
|
|
MAX_HEIGHT: 600 |
|
|
|
BODY_TGAP: 10, |
|
|
|
|
|
|
|
BODY_HGAP: 20, |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
props: { |
|
|
@ -27,6 +25,8 @@ BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
footer: null, |
|
|
|
footer: null, |
|
|
|
footerHeight: 44, |
|
|
|
footerHeight: 44, |
|
|
|
closable: true, // BI-40839 是否显示右上角的关闭按钮
|
|
|
|
closable: true, // BI-40839 是否显示右上角的关闭按钮
|
|
|
|
|
|
|
|
bodyHgap: 20, |
|
|
|
|
|
|
|
bodyTgap: 10 |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
@ -99,23 +99,23 @@ BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
self.body = this; |
|
|
|
self.body = this; |
|
|
|
}, |
|
|
|
}, |
|
|
|
css: { |
|
|
|
css: { |
|
|
|
"max-height": this._getSuitableBodyHeight(c.MAX_HEIGHT - o.headerHeight - (o.footer ? o.footerHeight : 0) - c.BODY_TGAP), |
|
|
|
"max-height": this._getSuitableBodyHeight(c.MAX_HEIGHT - o.headerHeight - (o.footer ? o.footerHeight : 0) - o.bodyTgap), |
|
|
|
"min-height": this._getSuitableBodyHeight(size.height), |
|
|
|
"min-height": this._getSuitableBodyHeight(size.height), |
|
|
|
}, |
|
|
|
}, |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
el: o.body, |
|
|
|
el: o.body, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
|
hgap: c.BODY_HGAP, |
|
|
|
hgap: o.bodyHgap, |
|
|
|
tgap: c.BODY_TGAP, |
|
|
|
tgap: o.bodyTgap, |
|
|
|
} : { |
|
|
|
} : { |
|
|
|
el: { |
|
|
|
el: { |
|
|
|
type: "bi.absolute", |
|
|
|
type: "bi.absolute", |
|
|
|
items: [{ |
|
|
|
items: [{ |
|
|
|
el: o.body, |
|
|
|
el: o.body, |
|
|
|
left: c.BODY_HGAP, |
|
|
|
left: o.bodyHgap, |
|
|
|
top: c.BODY_TGAP, |
|
|
|
top: o.bodyTgap, |
|
|
|
right: c.BODY_HGAP, |
|
|
|
right: o.bodyHgap, |
|
|
|
bottom: 0, |
|
|
|
bottom: 0, |
|
|
|
}], |
|
|
|
}], |
|
|
|
}, |
|
|
|
}, |
|
|
@ -163,7 +163,7 @@ BI.Popover = BI.inherit(BI.Widget, { |
|
|
|
_getSuitableBodyHeight: function (height) { |
|
|
|
_getSuitableBodyHeight: function (height) { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var c = this._constant; |
|
|
|
var c = this._constant; |
|
|
|
return BI.clamp(height, 0, BI.Widget._renderEngine.createElement("body")[0].clientHeight - o.headerHeight - (o.footer ? o.footerHeight : 0) - c.BODY_TGAP); |
|
|
|
return BI.clamp(height, 0, BI.Widget._renderEngine.createElement("body")[0].clientHeight - o.headerHeight - (o.footer ? o.footerHeight : 0) - o.bodyTgap); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_getSuitableHeight: function (height) { |
|
|
|
_getSuitableHeight: function (height) { |
|
|
|