diff --git a/src/core/platform/web/config.js b/src/core/platform/web/config.js index 0076811fd..3bd279aab 100644 --- a/src/core/platform/web/config.js +++ b/src/core/platform/web/config.js @@ -49,7 +49,7 @@ BI.prepares.push(function () { // 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧 var hasAutoAndFillColumnSize = false; if (ob.columnSize && ob.columnSize.length > 0) { - if (ob.columnSize.indexOf("") >= 0 && ob.columnSize.indexOf("fill") >= 0) { + if ((ob.columnSize.indexOf("") >= 0 || ob.columnSize.indexOf("auto") >= 0) && ob.columnSize.indexOf("fill") >= 0) { hasAutoAndFillColumnSize = true; } } else { @@ -57,7 +57,7 @@ BI.prepares.push(function () { BI.each(ob.items, function (i, item) { if (item.width === "fill") { hasFill = true; - } else if (BI.isNull(item.width) || item.width === "") { + } else if (BI.isNull(item.width) || item.width === "" || item.width === "auto") { hasAuto = true; } }); @@ -173,7 +173,7 @@ BI.prepares.push(function () { } var hasAuto = false; if (ob.rowSize && ob.rowSize.length > 0) { - if (ob.rowSize.indexOf("") >= 0) { + if (ob.rowSize.indexOf("") >= 0 || ob.rowSize.indexOf("auto") >= 0) { hasAuto = true; } } else { diff --git a/src/core/wrapper/layout/flex/flex.horizontal.js b/src/core/wrapper/layout/flex/flex.horizontal.js index 1d921c89f..7b87a2d1c 100644 --- a/src/core/wrapper/layout/flex/flex.horizontal.js +++ b/src/core/wrapper/layout/flex/flex.horizontal.js @@ -40,10 +40,10 @@ BI.FlexHorizontalLayout = BI.inherit(BI.Layout, { _hasFill: function () { var o = this.options; if (o.columnSize.length > 0) { - return o.columnSize.indexOf("fill") >= 0; + return o.columnSize.indexOf("fill") >= 0 || o.columnSize.indexOf("auto") >= 0; } return BI.some(o.items, function (i, item) { - if (item.width === "fill") { + if (item.width === "fill" || item.width === "auto") { return true; } }); diff --git a/src/core/wrapper/layout/flex/flex.vertical.js b/src/core/wrapper/layout/flex/flex.vertical.js index e885f5b9e..4f9ee1119 100644 --- a/src/core/wrapper/layout/flex/flex.vertical.js +++ b/src/core/wrapper/layout/flex/flex.vertical.js @@ -39,10 +39,10 @@ BI.FlexVerticalLayout = BI.inherit(BI.Layout, { _hasFill: function () { var o = this.options; if (o.rowSize.length > 0) { - return o.rowSize.indexOf("fill") >= 0; + return o.rowSize.indexOf("fill") >= 0 || o.rowSize.indexOf("auto") >= 0; } return BI.some(o.items, function (i, item) { - if (item.height === "fill") { + if (item.height === "fill" || item.height === "auto") { return true; } }); 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 94e10fb14..d159d8890 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.horizontal.js @@ -36,10 +36,10 @@ BI.FlexWrapperHorizontalLayout = BI.inherit(BI.Layout, { _hasFill: function () { var o = this.options; if (o.columnSize.length > 0) { - return o.columnSize.indexOf("fill") >= 0; + return o.columnSize.indexOf("fill") >= 0 || o.columnSize.indexOf("auto") >= 0; } return BI.some(o.items, function (i, item) { - if (item.width === "fill") { + if (item.width === "fill" || item.width === "auto") { return true; } }); 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 f9d85948f..0f1c9b166 100644 --- a/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js +++ b/src/core/wrapper/layout/flex/wrapper/flex.wrapper.vertical.js @@ -36,10 +36,10 @@ BI.FlexWrapperVerticalLayout = BI.inherit(BI.Layout, { _hasFill: function () { var o = this.options; if (o.rowSize.length > 0) { - return o.rowSize.indexOf("fill") >= 0; + return o.rowSize.indexOf("fill") >= 0 || o.rowSize.indexOf("auto") >= 0; } return BI.some(o.items, function (i, item) { - if (item.height === "fill") { + if (item.height === "fill" || item.height === "auto") { return true; } });