Browse Source

Pull request #1875: 无JIRA任务 布局大一统

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

* commit 'aa6de5be5bc1deb9b748e1cb1adad50a7e596884':
  布局大一统
  布局大一统
es6
guy 4 years ago
parent
commit
5358e0c552
  1. 38
      src/core/platform/web/config.js
  2. 4
      src/less/base/single/icon.less

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

@ -74,39 +74,27 @@ BI.prepares.push(function () {
return BI.extend({}, ob, {type: "bi.inline_horizontal_adapt"}); return BI.extend({}, ob, {type: "bi.inline_horizontal_adapt"});
}); });
BI.Plugin.configWidget("bi.left_right_vertical_adapt", function (ob) {
if (isSupportFlex()) {
// IE下其实也是可以使用flex布局的,只要排除掉出现滚动条的情况
// if (!BI.isIE() || (ob.scrollable !== true && ob.scrolly !== true)) {
return BI.extend({}, ob, {type: "bi.flex_left_right_vertical_adapt"});
// }
}
return ob;
});
BI.Plugin.configWidget("bi.flex_horizontal", function (ob) { BI.Plugin.configWidget("bi.flex_horizontal", function (ob) {
if (ob.scrollable === true || ob.scrolly === true) { if (ob.scrollable === true || ob.scrollx !== false) {
if (ob.hgap > 0 || ob.rgap > 0) {// flex中最后一个margin-right不生效
return BI.extend({}, ob, {type: "bi.flex_scrollable_horizontal"}); return BI.extend({}, ob, {type: "bi.flex_scrollable_horizontal"});
} }
}
}); });
BI.Plugin.configWidget("bi.flex_vertical", function (ob) { BI.Plugin.configWidget("bi.flex_vertical", function (ob) {
if (ob.scrollable === true || ob.scrollx === true) { if (ob.scrollable === true || ob.scrollx === true) {
if (ob.hgap > 0 || ob.rgap > 0) {// flex中最后一个margin-right不生效
return BI.extend({}, ob, {type: "bi.flex_scrollable_vertical"}); return BI.extend({}, ob, {type: "bi.flex_scrollable_vertical"});
} }
});
BI.Plugin.configWidget("bi.flex_horizontal_adapt", function (ob) {
if (ob.scrollable === true || ob.scrollx === true) {
return BI.extend({}, ob, {type: "bi.flex_scrollable_horizontal_adapt"});
}
});
BI.Plugin.configWidget("bi.flex_vertical_adapt", function (ob) {
if (ob.scrollable === true || ob.scrolly === true) {
return BI.extend({}, ob, {type: "bi.flex_scrollable_vertical_adapt"});
}
});
BI.Plugin.configWidget("bi.flex_horizontal_center_adapt", function (ob) {
if (ob.scrollable === true || ob.scrollx === true) {
return BI.extend({}, ob, {type: "bi.flex_scrollable_horizontal_adapt"});
}
});
BI.Plugin.configWidget("bi.flex_vertical_center_adapt", function (ob) {
if (ob.scrollable === true || ob.scrolly === true) {
return BI.extend({}, ob, {type: "bi.flex_scrollable_vertical_adapt"});
}
});
BI.Plugin.configWidget("bi.flex_center_adapt", function (ob) {
if (ob.scrollable === true || ob.scrolly === true || ob.scrollx === true) {
return BI.extend({}, ob, {type: "bi.flex_scrollable_center_adapt"});
} }
}); });

4
src/less/base/single/icon.less

@ -1,5 +1,5 @@
.x-icon.b-font { .x-icon.b-font {
// todo 删掉文件 // todo 删掉文件
margin: auto; //margin: auto;
width: 100%; //width: 100%;
} }

Loading…
Cancel
Save