diff --git a/src/core/platform/web/config.js b/src/core/platform/web/config.js index 3bd279aab..bcbf6caa4 100644 --- a/src/core/platform/web/config.js +++ b/src/core/platform/web/config.js @@ -45,6 +45,25 @@ BI.prepares.push(function () { scrollx: true }, ob, {type: "bi.inline"}); }); + BI.Plugin.configWidget("bi.vertical", function (ob) { + if (ob.horizontalAlign === BI.HorizontalAlign.Left || ob.horizontalAlign === BI.HorizontalAlign.Right) { + if (isSupportFlex()) { + return BI.extend({}, ob, {type: "bi.flex_vertical"}); + } + return BI.extend({}, ob, { + horizontalAlign: BI.HorizontalAlign.Stretch, + type: "bi.vertical", + items: BI.map(ob.items, function (item) { + return { + type: "bi.inline", + horizontalAlign: ob.horizontalAlign, + items: [item] + }; + }) + }); + } + return ob; + }); BI.Plugin.configWidget("bi.inline", function (ob) { // 当列宽既需要自动列宽又需要自适应列宽时,inline布局也处理不了了,降级table处理吧 var hasAutoAndFillColumnSize = false;