diff --git a/src/core/platform/web/config.js b/src/core/platform/web/config.js index 78cf5bffa..02764ae06 100644 --- a/src/core/platform/web/config.js +++ b/src/core/platform/web/config.js @@ -107,41 +107,41 @@ BI.prepares.push(function () { return ob; }); - BI.Plugin.configWidget("bi.flex_horizontal", function (ob) { - if (ob.scrollable === true || ob.scrolly === true) { - return BI.extend({}, ob, {type: "bi.flex_scrollable_horizontal"}); - } - }); - BI.Plugin.configWidget("bi.flex_vertical", function (ob) { - if (ob.scrollable === true || ob.scrollx === true) { - 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"}); - } - }); + // BI.Plugin.configWidget("bi.flex_horizontal", function (ob) { + // if (ob.scrollable === true || ob.scrolly === true) { + // return BI.extend({}, ob, {type: "bi.flex_scrollable_horizontal"}); + // } + // }); + // BI.Plugin.configWidget("bi.flex_vertical", function (ob) { + // if (ob.scrollable === true || ob.scrollx === true) { + // 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"}); + // } + // }); BI.Plugin.configWidget("bi.radio", function (ob) { if (BI.isIE() && BI.getIEVersion() <= 9) { diff --git a/src/less/core/wrapper/flex.horizontal.less b/src/less/core/wrapper/flex.horizontal.less index c20a7c55a..452aeca4c 100644 --- a/src/less/core/wrapper/flex.horizontal.less +++ b/src/less/core/wrapper/flex.horizontal.less @@ -63,15 +63,19 @@ flex-wrap: nowrap; &.v-middle { - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -ms-flex-align: center; - -o-align-items: center; - align-items: center; + ///* 09版 */ + //-webkit-box-align: center; + ///* 12版 */ + //-webkit-align-items: center; + //-moz-align-items: center; + //-ms-align-items: center; + //-ms-flex-align: center; + //-o-align-items: center; + //align-items: center; + > * { + margin-top: auto !important; + margin-bottom: auto !important; + } } &.v-bottom { @@ -99,15 +103,22 @@ } &.h-center { - /* 09版 */ - -webkit-box-pack: center; - /* 12版 */ - -webkit-justify-content: center; - -moz-justify-content: center; - -ms-justify-content: center; - -ms-flex-pack: center; - -o-justify-content: center; - justify-content: center; + ///* 09版 */ + //-webkit-box-pack: center; + ///* 12版 */ + //-webkit-justify-content: center; + //-moz-justify-content: center; + //-ms-justify-content: center; + //-ms-flex-pack: center; + //-o-justify-content: center; + //justify-content: center; + > *:first-child { + margin-left: auto !important; + } + + > *:last-child { + margin-right: auto !important; + } } &.h-right { diff --git a/src/less/core/wrapper/flex.vertical.less b/src/less/core/wrapper/flex.vertical.less index eb22290b5..7b123be52 100644 --- a/src/less/core/wrapper/flex.vertical.less +++ b/src/less/core/wrapper/flex.vertical.less @@ -28,7 +28,7 @@ flex-direction: row; } -.bi-f-v, .bi-flex-vertical-layout{ +.bi-f-v, .bi-flex-vertical-layout { .flex(); .vertical(); @@ -62,15 +62,19 @@ flex-wrap: nowrap; &.h-center { - /* 09版 */ - -webkit-box-align: center; - /* 12版 */ - -webkit-align-items: center; - -moz-align-items: center; - -ms-align-items: center; - -ms-flex-align: center; - -o-align-items: center; - align-items: center; + ///* 09版 */ + //-webkit-box-align: center; + ///* 12版 */ + //-webkit-align-items: center; + //-moz-align-items: center; + //-ms-align-items: center; + //-ms-flex-align: center; + //-o-align-items: center; + //align-items: center; + > * { + margin-left: auto !important; + margin-right: auto !important; + } } &.h-right { @@ -98,15 +102,22 @@ } &.v-middle { - /* 09版 */ - -webkit-box-pack: center; - /* 12版 */ - -webkit-justify-content: center; - -moz-justify-content: center; - -ms-justify-content: center; - -ms-flex-pack: center; - -o-justify-content: center; - justify-content: center; + ///* 09版 */ + //-webkit-box-pack: center; + ///* 12版 */ + //-webkit-justify-content: center; + //-moz-justify-content: center; + //-ms-justify-content: center; + //-ms-flex-pack: center; + //-o-justify-content: center; + //justify-content: center; + > *:first-child { + margin-left: auto !important; + } + + > *:last-child { + margin-right: auto !important; + } } &.v-bottom {