diff --git a/src/core/wrapper/layout/flex/flex.horizontal.js b/src/core/wrapper/layout/flex/flex.horizontal.js index 7d2045060..a6e23c2f0 100644 --- a/src/core/wrapper/layout/flex/flex.horizontal.js +++ b/src/core/wrapper/layout/flex/flex.horizontal.js @@ -34,7 +34,9 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.horizontalAlign !== BI.HorizontalAlign.Stretch && o.columnSize[i] !== "auto") { + if (o.horizontalAlign === BI.HorizontalAlign.Stretch && o.columnSize[i] !== "") { + w.element.addClass("fill"); + } else { w.element.addClass("shrink-none"); } if (o.columnSize[i] > 0) { diff --git a/src/core/wrapper/layout/flex/flex.vertical.js b/src/core/wrapper/layout/flex/flex.vertical.js index 34acdb4c3..7a78b1bba 100644 --- a/src/core/wrapper/layout/flex/flex.vertical.js +++ b/src/core/wrapper/layout/flex/flex.vertical.js @@ -33,7 +33,9 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.verticalAlign !== BI.VerticalAlign.Stretch && o.rowSize[i] !== "auto") { + if (o.verticalAlign === BI.VerticalAlign.Stretch && o.rowSize[i] !== "") { + w.element.addClass("fill"); + } else { w.element.addClass("shrink-none"); } if (o.rowSize[i] > 0) { diff --git a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js index 1a3e62bb6..e8286ddb2 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js @@ -35,7 +35,9 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.horizontalAlign !== BI.HorizontalAlign.Stretch && o.columnSize[i] !== "auto") { + if (o.horizontalAlign === BI.HorizontalAlign.Stretch && o.columnSize[i] !== "") { + w.element.addClass("fill"); + } else { w.element.addClass("shrink-none"); } if (o.columnSize[i] > 0) { diff --git a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js index 0af54996c..3edb0bc9e 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js @@ -35,7 +35,9 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.verticalAlign !== BI.VerticalAlign.Stretch && o.rowSize[i] !== "auto") { + if (o.verticalAlign === BI.VerticalAlign.Stretch && o.rowSize[i] !== "") { + w.element.addClass("fill"); + } else { w.element.addClass("shrink-none"); } if (o.rowSize[i] > 0) { diff --git a/src/less/core/wrapper/flex.horizontal.less b/src/less/core/wrapper/flex.horizontal.less index d6122ff4f..2c8f4301f 100644 --- a/src/less/core/wrapper/flex.horizontal.less +++ b/src/less/core/wrapper/flex.horizontal.less @@ -119,44 +119,6 @@ flex-direction: row-reverse; } - &.h-stretch { - .vertical(); - - /* 09版 */ - -webkit-box-align: stretch; - /* 12版 */ - -webkit-align-items: stretch; - -moz-align-items: stretch; - -ms-align-items: stretch; - -ms-flex-align: stretch; - -o-align-items: stretch; - align-items: stretch; - - &.v-middle { - /* 09版 */ - -webkit-box-pack: center; - /* 12版 */ - -webkit-justify-content: center; - -moz-justify-content: center; - -ms-justify-content: center; - -o-justify-content: center; - -ms-flex-pack: center; - justify-content: center; - } - - &.v-bottom { - /* 09版 */ - -webkit-box-pack: flex-end; - /* 12版 */ - -webkit-justify-content: flex-end; - -moz-justify-content: flex-end; - -ms-justify-content: flex-end; - -o-justify-content: flex-end; - -ms-flex-pack: flex-end; - justify-content: flex-end; - } - } - > .shrink-none { -webkit-flex-shrink: 0; -moz-flex-shrink: 0; diff --git a/src/less/core/wrapper/flex.vertical.less b/src/less/core/wrapper/flex.vertical.less index 0e8c7b501..d1fe9a73d 100644 --- a/src/less/core/wrapper/flex.vertical.less +++ b/src/less/core/wrapper/flex.vertical.less @@ -118,44 +118,6 @@ flex-direction: column-reverse; } - &.v-stretch { - .horizontal(); - - /* 09版 */ - -webkit-box-align: stretch; - /* 12版 */ - -webkit-align-items: stretch; - -moz-align-items: stretch; - -ms-align-items: stretch; - -ms-flex-align: stretch; - -o-align-items: stretch; - align-items: stretch; - - &.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; - } - - &.h-right { - /* 09版 */ - -webkit-box-pack: flex-end; - /* 12版 */ - -webkit-justify-content: flex-end; - -moz-justify-content: flex-end; - -ms-justify-content: flex-end; - -ms-flex-pack: flex-end; - -o-justify-content: flex-end; - justify-content: flex-end; - } - } - > .shrink-none { -webkit-flex-shrink: 0; -moz-flex-shrink: 0; diff --git a/src/less/core/wrapper/flex.wrapper.horizontal.less b/src/less/core/wrapper/flex.wrapper.horizontal.less index 98290029f..d0bb627b9 100644 --- a/src/less/core/wrapper/flex.wrapper.horizontal.less +++ b/src/less/core/wrapper/flex.wrapper.horizontal.less @@ -126,44 +126,6 @@ flex-direction: row-reverse; } - &.h-stretch { - .vertical(); - - /* 09版 */ - -webkit-box-align: stretch; - /* 12版 */ - -webkit-align-items: stretch; - -moz-align-items: stretch; - -ms-align-items: stretch; - -ms-flex-align: stretch; - -o-align-items: stretch; - align-items: stretch; - - &.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; - } - - &.v-bottom { - /* 09版 */ - -webkit-box-pack: flex-end; - /* 12版 */ - -webkit-justify-content: flex-end; - -moz-justify-content: flex-end; - -ms-justify-content: flex-end; - -ms-flex-pack: end; - -o-justify-content: flex-end; - justify-content: flex-end; - } - } - > .shrink-none { -webkit-flex-shrink: 0; -moz-flex-shrink: 0; diff --git a/src/less/core/wrapper/flex.wrapper.vertical.less b/src/less/core/wrapper/flex.wrapper.vertical.less index 1992d7757..c429b32ab 100644 --- a/src/less/core/wrapper/flex.wrapper.vertical.less +++ b/src/less/core/wrapper/flex.wrapper.vertical.less @@ -126,44 +126,6 @@ flex-direction: column-reverse; } - &.v-stretch { - .horizontal(); - - /* 09版 */ - -webkit-box-align: stretch; - /* 12版 */ - -webkit-align-items: stretch; - -moz-align-items: stretch; - -ms-align-items: stretch; - -ms-flex-align: stretch; - -o-align-items: stretch; - align-items: stretch; - - &.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; - } - - &.h-right { - /* 09版 */ - -webkit-box-pack: flex-end; - /* 12版 */ - -webkit-justify-content: flex-end; - -moz-justify-content: flex-end; - -ms-justify-content: flex-end; - -ms-flex-pack: flex-end; - -o-justify-content: flex-end; - justify-content: flex-end; - } - } - > .shrink-none { -webkit-flex-shrink: 0; -moz-flex-shrink: 0;