diff --git a/src/core/wrapper/layout/flex/flex.horizontal.js b/src/core/wrapper/layout/flex/flex.horizontal.js index 7d2045060..0b95e803d 100644 --- a/src/core/wrapper/layout/flex/flex.horizontal.js +++ b/src/core/wrapper/layout/flex/flex.horizontal.js @@ -34,8 +34,12 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.horizontalAlign !== BI.HorizontalAlign.Stretch && o.columnSize[i] !== "auto") { - w.element.addClass("shrink-none"); + if (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) { w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)); diff --git a/src/core/wrapper/layout/flex/flex.vertical.js b/src/core/wrapper/layout/flex/flex.vertical.js index 34acdb4c3..c6d73d683 100644 --- a/src/core/wrapper/layout/flex/flex.vertical.js +++ b/src/core/wrapper/layout/flex/flex.vertical.js @@ -33,8 +33,12 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.verticalAlign !== BI.VerticalAlign.Stretch && o.rowSize[i] !== "auto") { - w.element.addClass("shrink-none"); + if (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) { w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)); 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..7dfe72fa8 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js @@ -35,8 +35,12 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.horizontalAlign !== BI.HorizontalAlign.Stretch && o.columnSize[i] !== "auto") { - w.element.addClass("shrink-none"); + if (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) { w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)); 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..77a1ba9d8 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js @@ -35,8 +35,12 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { w.element.css({ position: "relative" }); - if (o.verticalAlign !== BI.VerticalAlign.Stretch && o.rowSize[i] !== "auto") { - w.element.addClass("shrink-none"); + if (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) { w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)); 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;