Browse Source

Pull request #1771: 无JIRA任务 bugfix

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

* commit '23aced351bda988e309021fa95660969f81748d6':
  bugfix
  bugfix
es6
guy 4 years ago
parent
commit
cdc83816ec
  1. 8
      src/core/wrapper/layout/flex/flex.horizontal.js
  2. 8
      src/core/wrapper/layout/flex/flex.vertical.js
  3. 8
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js
  4. 8
      src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js
  5. 38
      src/less/core/wrapper/flex.horizontal.less
  6. 38
      src/less/core/wrapper/flex.vertical.less
  7. 38
      src/less/core/wrapper/flex.wrapper.horizontal.less
  8. 38
      src/less/core/wrapper/flex.wrapper.vertical.less

8
src/core/wrapper/layout/flex/flex.horizontal.js

@ -34,8 +34,12 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.horizontalAlign !== BI.HorizontalAlign.Stretch && o.columnSize[i] !== "auto") { if (o.columnSize[i] !== "auto") {
w.element.addClass("shrink-none"); if (o.horizontalAlign === BI.HorizontalAlign.Stretch && o.columnSize[i] !== "") {
w.element.addClass("fill");
} else {
w.element.addClass("shrink-none");
}
} }
if (o.columnSize[i] > 0) { if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)); w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit));

8
src/core/wrapper/layout/flex/flex.vertical.js

@ -33,8 +33,12 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.verticalAlign !== BI.VerticalAlign.Stretch && o.rowSize[i] !== "auto") { if (o.rowSize[i] !== "auto") {
w.element.addClass("shrink-none"); if (o.verticalAlign === BI.VerticalAlign.Stretch && o.rowSize[i] !== "") {
w.element.addClass("fill");
} else {
w.element.addClass("shrink-none");
}
} }
if (o.rowSize[i] > 0) { if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)); w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit));

8
src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js

@ -35,8 +35,12 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.horizontalAlign !== BI.HorizontalAlign.Stretch && o.columnSize[i] !== "auto") { if (o.columnSize[i] !== "auto") {
w.element.addClass("shrink-none"); if (o.horizontalAlign === BI.HorizontalAlign.Stretch && o.columnSize[i] !== "") {
w.element.addClass("fill");
} else {
w.element.addClass("shrink-none");
}
} }
if (o.columnSize[i] > 0) { if (o.columnSize[i] > 0) {
w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit)); w.element.width(o.columnSize[i] <= 1 ? (o.columnSize[i] * 100 + "%") : (o.columnSize[i] / BI.pixRatio + BI.pixUnit));

8
src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js

@ -35,8 +35,12 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, {
w.element.css({ w.element.css({
position: "relative" position: "relative"
}); });
if (o.verticalAlign !== BI.VerticalAlign.Stretch && o.rowSize[i] !== "auto") { if (o.rowSize[i] !== "auto") {
w.element.addClass("shrink-none"); if (o.verticalAlign === BI.VerticalAlign.Stretch && o.rowSize[i] !== "") {
w.element.addClass("fill");
} else {
w.element.addClass("shrink-none");
}
} }
if (o.rowSize[i] > 0) { if (o.rowSize[i] > 0) {
w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit)); w.element.height(o.rowSize[i] <= 1 ? (o.rowSize[i] * 100 + "%") : (o.rowSize[i] / BI.pixRatio + BI.pixUnit));

38
src/less/core/wrapper/flex.horizontal.less

@ -119,44 +119,6 @@
flex-direction: row-reverse; 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 { > .shrink-none {
-webkit-flex-shrink: 0; -webkit-flex-shrink: 0;
-moz-flex-shrink: 0; -moz-flex-shrink: 0;

38
src/less/core/wrapper/flex.vertical.less

@ -118,44 +118,6 @@
flex-direction: column-reverse; 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 { > .shrink-none {
-webkit-flex-shrink: 0; -webkit-flex-shrink: 0;
-moz-flex-shrink: 0; -moz-flex-shrink: 0;

38
src/less/core/wrapper/flex.wrapper.horizontal.less

@ -126,44 +126,6 @@
flex-direction: row-reverse; 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 { > .shrink-none {
-webkit-flex-shrink: 0; -webkit-flex-shrink: 0;
-moz-flex-shrink: 0; -moz-flex-shrink: 0;

38
src/less/core/wrapper/flex.wrapper.vertical.less

@ -126,44 +126,6 @@
flex-direction: column-reverse; 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 { > .shrink-none {
-webkit-flex-shrink: 0; -webkit-flex-shrink: 0;
-moz-flex-shrink: 0; -moz-flex-shrink: 0;

Loading…
Cancel
Save