|
|
|
@ -108,12 +108,13 @@
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 获取滚动条的宽度,页面display: none时候获取到的为0
|
|
|
|
|
getScrollWidth: function () { |
|
|
|
|
getScrollWidth: function (css) { |
|
|
|
|
if (BI.isNull(this._scrollWidth) || this._scrollWidth === 0) { |
|
|
|
|
var ul = BI.Widget._renderEngine.createElement("<div>").width(50).height(50).css({ |
|
|
|
|
position: "absolute", |
|
|
|
|
top: "-9999px", |
|
|
|
|
overflow: "scroll" |
|
|
|
|
overflow: "scroll", |
|
|
|
|
...css |
|
|
|
|
}).appendTo("body"); |
|
|
|
|
this._scrollWidth = ul[0].offsetWidth - ul[0].clientWidth; |
|
|
|
|
ul.destroy(); |
|
|
|
|