From 542a8c91f28b8fe7f7525f9a0489480c4a152038 Mon Sep 17 00:00:00 2001 From: git Date: Sat, 19 Jun 2021 14:02:59 +0800 Subject: [PATCH] update --- src/core/wrapper/layout/flex/flex.horizontal.js | 4 ++-- src/core/wrapper/layout/flex/flex.vertical.js | 2 +- .../wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js | 2 +- src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/wrapper/layout/flex/flex.horizontal.js b/src/core/wrapper/layout/flex/flex.horizontal.js index 60cb474ac1..bf5b9e0e13 100644 --- a/src/core/wrapper/layout/flex/flex.horizontal.js +++ b/src/core/wrapper/layout/flex/flex.horizontal.js @@ -10,7 +10,7 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { return BI.extend(BI.FlexHorizontalLayout.superclass.props.apply(this, arguments), { baseCls: "bi-f-h", verticalAlign: BI.VerticalAlign.Top, - horizontalAlign: BI.HorizontalAlign.Left,// 如果只有一个子元素且想让该子元素横向撑满,设置成Stretch + horizontalAlign: BI.HorizontalAlign.Left, // 如果只有一个子元素且想让该子元素横向撑满,设置成Stretch columnSize: [], scrollx: true, hgap: 0, @@ -37,7 +37,7 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { _addElement: function (i, item) { var o = this.options; var w = BI.FlexHorizontalLayout.superclass._addElement.apply(this, arguments); - var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width; + var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? "" : item.width; w.element.css({ position: "relative" }); diff --git a/src/core/wrapper/layout/flex/flex.vertical.js b/src/core/wrapper/layout/flex/flex.vertical.js index 3e6a204338..60058d319d 100644 --- a/src/core/wrapper/layout/flex/flex.vertical.js +++ b/src/core/wrapper/layout/flex/flex.vertical.js @@ -36,7 +36,7 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, { _addElement: function (i, item) { var o = this.options; var w = BI.FlexVerticalLayout.superclass._addElement.apply(this, arguments); - var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height; + var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height >= 1 ? "" : item.height; w.element.css({ position: "relative" }); 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 f4623241d0..b19bbebcd4 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js @@ -33,7 +33,7 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, { _addElement: function (i, item) { var o = this.options; var w = BI.FlexWrapperHorizontalLayout.superclass._addElement.apply(this, arguments); - var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width; + var columnSize = o.columnSize.length > 0 ? o.columnSize[i] : item.width >= 1 ? "" : item.width; w.element.css({ position: "relative" }); 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 6c0e593f67..60cb79e31c 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js @@ -33,7 +33,7 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { _addElement: function (i, item) { var o = this.options; var w = BI.FlexWrapperVerticalLayout.superclass._addElement.apply(this, arguments); - var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height; + var rowSize = o.rowSize.length > 0 ? o.rowSize[i] : item.height >= 1 ? "" : item.height; w.element.css({ position: "relative" });