From 3038599fb8ff154de7d81f0f8660cb1ad3071f97 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 19 Aug 2021 23:06:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/core/wrapper/layout/layout.inline.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/core/wrapper/layout/layout.inline.js b/src/core/wrapper/layout/layout.inline.js index d83af8519..9e3b35470 100644 --- a/src/core/wrapper/layout/layout.inline.js +++ b/src/core/wrapper/layout/layout.inline.js @@ -43,18 +43,14 @@ BI.InlineLayout = BI.inherit(BI.Layout, { columnSize = null; } } + if (columnSize > 0) { + w.element.width(columnSize < 1 ? ((columnSize * 100).toFixed(1) + "%") : (columnSize / BI.pixRatio + BI.pixUnit)); + } w.element.css({ position: "relative", - "vertical-align": o.verticalAlign, - width: "auto", - "min-width": "auto", - "max-width": "none" + "vertical-align": o.verticalAlign }); w.element.addClass("i-item"); - - if (columnSize > 0) { - w.element.width(columnSize < 1 ? ((columnSize * 100).toFixed(1) + "%") : (columnSize / BI.pixRatio + BI.pixUnit)); - } if (columnSize === "fill" || columnSize === "") { var length = o.hgap; var fillCount = 0, autoCount = 0;