Browse Source

Pull request #1876: 无JIRA任务 IE判断的也去掉

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

* commit '33ebcd5e1e769e98ae4521c3b4eb2619a9784228':
  布局大一统
  布局大一统
es6
guy 4 years ago
parent
commit
ad35bd22c5
  1. 12
      src/core/platform/web/config.js
  2. 2
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js
  3. 2
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.center.js
  4. 2
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js

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

@ -23,7 +23,7 @@ BI.prepares.push(function () {
if (ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch) { if (ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch) {
return BI.extend({}, ob, {type: "bi.table_adapt"}); return BI.extend({}, ob, {type: "bi.table_adapt"});
} }
if (!isIE && supportFlex) { if (supportFlex) {
return BI.extend({}, ob, {type: "bi.flex_horizontal"}); return BI.extend({}, ob, {type: "bi.flex_horizontal"});
} }
// // 解决使用inline_vertical_adapt的顺序问题 // // 解决使用inline_vertical_adapt的顺序问题
@ -37,10 +37,10 @@ BI.prepares.push(function () {
return BI.extend({}, ob, {type: "bi.table_adapt"}); return BI.extend({}, ob, {type: "bi.table_adapt"});
}); });
BI.Plugin.configWidget("bi.center_adapt", function (ob) { BI.Plugin.configWidget("bi.center_adapt", function (ob) {
var isIE = BI.isIE(), supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1); var supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);
var isAdapt = !ob.horizontalAlign || ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch; var isAdapt = !ob.horizontalAlign || ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch;
if (!isAdapt || justOneItem) { if (!isAdapt || justOneItem) {
if (!isIE && supportFlex) { if (supportFlex) {
return BI.extend({}, ob, {type: "bi.flex_center_adapt"}); return BI.extend({}, ob, {type: "bi.flex_center_adapt"});
} }
return BI.extend({}, ob, {type: "bi.inline_center_adapt"}); return BI.extend({}, ob, {type: "bi.inline_center_adapt"});
@ -48,10 +48,10 @@ BI.prepares.push(function () {
return ob; return ob;
}); });
BI.Plugin.configWidget("bi.vertical_adapt", function (ob) { BI.Plugin.configWidget("bi.vertical_adapt", function (ob) {
var isIE = BI.isIE(), supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1); var supportFlex = isSupportFlex(), justOneItem = (ob.items && ob.items.length <= 1);
var isAdapt = ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch; var isAdapt = ob.horizontalAlign === BI.HorizontalAlign.Center || ob.horizontalAlign === BI.HorizontalAlign.Stretch;
if (!isAdapt || justOneItem) { if (!isAdapt || justOneItem) {
if (!isIE && supportFlex) { if (supportFlex) {
return BI.extend({}, ob, {type: "bi.flex_vertical_center_adapt"}); return BI.extend({}, ob, {type: "bi.flex_vertical_center_adapt"});
} }
return BI.extend({}, ob, {type: "bi.inline_vertical_adapt"}); return BI.extend({}, ob, {type: "bi.inline_vertical_adapt"});
@ -68,7 +68,7 @@ BI.prepares.push(function () {
return ob; return ob;
}); });
BI.Plugin.configWidget("bi.horizontal_float", function (ob) { BI.Plugin.configWidget("bi.horizontal_float", function (ob) {
if (!BI.isIE() && isSupportFlex()) { if (isSupportFlex()) {
return BI.extend({}, ob, {type: "bi.flex_horizontal_adapt"}); return BI.extend({}, ob, {type: "bi.flex_horizontal_adapt"});
} }
return BI.extend({}, ob, {type: "bi.inline_horizontal_adapt"}); return BI.extend({}, ob, {type: "bi.inline_horizontal_adapt"});

2
src/core/wrapper/layout/flex/wrapper/flex.wrapper.center.js

@ -8,7 +8,7 @@
BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, { BI.FlexWrapperCenterLayout = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexWrapperCenterLayout.superclass.props.apply(this, arguments), {
baseCls: "bi-f-s-c clearfix", baseCls: "bi-f-s-c",
horizontalAlign: BI.HorizontalAlign.Center, horizontalAlign: BI.HorizontalAlign.Center,
verticalAlign: BI.VerticalAlign.Middle, verticalAlign: BI.VerticalAlign.Middle,
columnSize: [], columnSize: [],

2
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.center.js

@ -8,7 +8,7 @@
BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, { BI.FlexWrapperHorizontalCenter = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexWrapperHorizontalCenter.superclass.props.apply(this, arguments), {
baseCls: "bi-f-s-v-c clearfix", baseCls: "bi-f-s-v-c",
horizontalAlign: BI.HorizontalAlign.Center, horizontalAlign: BI.HorizontalAlign.Center,
verticalAlign: BI.VerticalAlign.Top, verticalAlign: BI.VerticalAlign.Top,
rowSize: [], rowSize: [],

2
src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.center.js

@ -8,7 +8,7 @@
BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, { BI.FlexWrapperVerticalCenter = BI.inherit(BI.Layout, {
props: function () { props: function () {
return BI.extend(BI.FlexWrapperVerticalCenter.superclass.props.apply(this, arguments), { return BI.extend(BI.FlexWrapperVerticalCenter.superclass.props.apply(this, arguments), {
baseCls: "bi-f-s-v-c clearfix", baseCls: "bi-f-s-v-c",
horizontalAlign: BI.HorizontalAlign.Left, horizontalAlign: BI.HorizontalAlign.Left,
verticalAlign: BI.VerticalAlign.Middle, verticalAlign: BI.VerticalAlign.Middle,
columnSize: [], columnSize: [],

Loading…
Cancel
Save