From 90d36a689d74529344b85d308e052726c6ac3557 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 28 Aug 2020 00:45:18 +0800 Subject: [PATCH] bugfix --- src/core/platform/web/config.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/core/platform/web/config.js b/src/core/platform/web/config.js index a5a63fe51..0f5726918 100644 --- a/src/core/platform/web/config.js +++ b/src/core/platform/web/config.js @@ -18,7 +18,16 @@ BI.prepares.push(function () { if (isLessIE8) { return ob; } - if (ob.items && ob.items.length > 1) { + // center_adapt + if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Center) { + return BI.extend(ob, {type: "bi.table_adapt"}); + } + // vertical_adapt + if (ob.verticalAlign === BI.VerticalAlign.Middle && ob.horizontalAlign === BI.HorizontalAlign.Left) { + return BI.extend(ob, {type: "bi.table_adapt"}); + } + // horizontal_adapt + if (ob.verticalAlign === BI.VerticalAlign.Top && ob.horizontalAlign === BI.HorizontalAlign.Center) { return BI.extend(ob, {type: "bi.table_adapt"}); } if (!IE && supportFlex) {