From 1f5077038ff5177d2840da017ee303b74c4f8279 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 2 Jul 2021 17:34:26 +0800 Subject: [PATCH] =?UTF-8?q?""=20=E5=92=8C=20"fill"=20=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=9A=84=E6=97=B6=E5=80=99=EF=BC=8Cfill?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E5=8E=8B=E7=BC=A9=EF=BC=8C""=20=E4=B8=8D?= =?UTF-8?q?=E5=8E=8B=E7=BC=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/wrapper/layout/flex/flex.horizontal.js | 4 ++++ src/core/wrapper/layout/flex/flex.vertical.js | 4 ++++ .../wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js | 4 ++++ src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/src/core/wrapper/layout/flex/flex.horizontal.js b/src/core/wrapper/layout/flex/flex.horizontal.js index e91c026754..ebd67976f7 100644 --- a/src/core/wrapper/layout/flex/flex.horizontal.js +++ b/src/core/wrapper/layout/flex/flex.horizontal.js @@ -53,6 +53,10 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { w.element.addClass("f-s-n"); } } + // 当既有动态宽度和自适应宽度的时候只压缩自适应 + if (columnSize === "" && o.columnSize.indexOf("fill") >= 0) { + w.element.addClass("f-s-n"); + } } else { w.element.addClass("f-s-n"); } diff --git a/src/core/wrapper/layout/flex/flex.vertical.js b/src/core/wrapper/layout/flex/flex.vertical.js index 85c117c50d..649b1bdedc 100644 --- a/src/core/wrapper/layout/flex/flex.vertical.js +++ b/src/core/wrapper/layout/flex/flex.vertical.js @@ -52,6 +52,10 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, { w.element.addClass("f-s-n"); } } + // 当既有动态宽度和自适应宽度的时候只压缩自适应 + if (rowSize === "" && o.rowSize.indexOf("fill") >= 0) { + w.element.addClass("f-s-n"); + } } else { w.element.addClass("f-s-n"); } 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 4a23a9024e..5ed9bf5bfa 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js @@ -49,6 +49,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, { w.element.addClass("f-s-n"); } } + // 当既有动态宽度和自适应宽度的时候只压缩自适应 + if (columnSize === "" && o.columnSize.indexOf("fill") >= 0) { + w.element.addClass("f-s-n"); + } } else { w.element.addClass("f-s-n"); } 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 62a38afbca..708a00c2ad 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js @@ -49,6 +49,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { w.element.addClass("f-s-n"); } } + // 当既有动态宽度和自适应宽度的时候只压缩自适应 + if (rowSize === "" && o.rowSize.indexOf("fill") >= 0) { + w.element.addClass("f-s-n"); + } } else { w.element.addClass("f-s-n"); }