Browse Source

Pull request #3577: 无JIRA任务 chore

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

* commit '3bd163e762bee6f00283f1296d59357aa9417cee':
  无JIRA任务 chore
research/test
guy-王川 2 years ago
parent
commit
7420b35c07
  1. 14
      src/core/platform/web/config.js

14
src/core/platform/web/config.js

@ -5,7 +5,7 @@
// 1、支持flex的浏览器下使用flex布局
// 2、不支持flex的浏览器下使用inline布局
// 3、当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了。当横向出滚动条时使用table布局,不出滚动条时使用float布局
var _isSupportFlex, _isSupportGrid;
var _isSupportFlex, _isSupportGrid, _isSupportSticky;
var isSupportFlex = function () {
if (_isSupportFlex == null) {
_isSupportFlex = !!(BI.isSupportCss3 && BI.isSupportCss3("flex"));
@ -18,8 +18,7 @@
}
return _isSupportGrid;
};
// 判断浏览器是否支持sticky 属性
var isSupportSticky = (function () {
var innerSupportSticky = function () {
var vendorList = ["", "-webkit-", "-ms-", "-moz-", "-o-"],
vendorListLength = vendorList.length,
stickyElement = document.createElement("div");
@ -30,7 +29,14 @@
}
}
return false;
})();
};
// 判断浏览器是否支持sticky 属性
var isSupportSticky = function () {
if (_isSupportSticky == null) {
_isSupportSticky = innerSupportSticky();
}
return _isSupportSticky;
};
BI.Plugin.configWidget("bi.horizontal", function (ob) {
var supportFlex = isSupportFlex();
// // 在横向自适应场景下我们需要使用table的自适应撑出滚动条的特性(flex处理不了这种情况)

Loading…
Cancel
Save