From 4447ed5a2551a1fc301e897122e81f6c028f9f79 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 28 Feb 2022 11:57:54 +0800 Subject: [PATCH] =?UTF-8?q?chore=EF=BC=9A=20=E5=8E=BB=E6=8E=89minHeight=3D?= =?UTF-8?q?50=E7=9A=84=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/case/combo/bubblecombo/popup.bubble.js | 2 +- src/core/3.ob.js | 4 +++- src/core/5.inject.js | 2 +- src/core/logic/logic.js | 4 ++-- src/core/logic/logic.layout.js | 18 +++++++++++++++--- 5 files changed, 22 insertions(+), 8 deletions(-) diff --git a/src/case/combo/bubblecombo/popup.bubble.js b/src/case/combo/bubblecombo/popup.bubble.js index d41767996..c65905821 100644 --- a/src/case/combo/bubblecombo/popup.bubble.js +++ b/src/case/combo/bubblecombo/popup.bubble.js @@ -11,7 +11,7 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, { baseCls: config.baseCls + " bi-bubble-popup-view", minWidth: 70, maxWidth: 300, - minHeight: 50, + // minHeight: 50, showArrow: true, }); } diff --git a/src/core/3.ob.js b/src/core/3.ob.js index 5cf3cda20..8f7ed1004 100644 --- a/src/core/3.ob.js +++ b/src/core/3.ob.js @@ -51,7 +51,9 @@ if (BI.isFunction(this.props)) { props = this.props(config); } - this.options = extend(this._defaultConfig(config), props, config); + var defaultProps = this._defaultConfig(config); + var modifiedDefaultProps = (config && config.type && BI.OB.configFunctions[config.type + ".props"]) ? BI.OB.configFunctions[config.type + ".props"](config, defaultProps) : null; + this.options = extend(defaultProps, props, modifiedDefaultProps, config); }, _init: function () { diff --git a/src/core/5.inject.js b/src/core/5.inject.js index 78417079c..3cb1d15bf 100644 --- a/src/core/5.inject.js +++ b/src/core/5.inject.js @@ -91,7 +91,7 @@ }; }; - var configFunctions = {}; + var configFunctions = BI.OB.configFunctions = {}; var runConfigFunction = function (type) { if (!type || !configFunctions[type]) { return false; diff --git a/src/core/logic/logic.js b/src/core/logic/logic.js index e5de9d24e..954456599 100644 --- a/src/core/logic/logic.js +++ b/src/core/logic/logic.js @@ -43,7 +43,6 @@ BI.LogicFactory = { case BI.Direction.Bottom: case BI.Direction.Custom: return BI.LogicFactory.Type.Vertical; - break; case BI.Direction.Left: case BI.Direction.Right: return BI.LogicFactory.Type.Horizontal; @@ -53,6 +52,7 @@ BI.LogicFactory = { createLogicItemsByDirection: function (direction) { var layout; var items = Array.prototype.slice.call(arguments, 1); + items = BI.compact(items); items = BI.map(items, function (i, item) { if (BI.isWidget(item)) { return { @@ -78,4 +78,4 @@ BI.LogicFactory = { } return items; } -}; \ No newline at end of file +}; diff --git a/src/core/logic/logic.layout.js b/src/core/logic/logic.layout.js index d86d914ba..21ce0f9b8 100644 --- a/src/core/logic/logic.layout.js +++ b/src/core/logic/logic.layout.js @@ -19,7 +19,9 @@ BI.VerticalLayoutLogic = BI.inherit(BI.Logic, { lgap: 0, rgap: 0, tgap: 0, - bgap: 0 + bgap: 0, + innerVgap: 0, + innerHgap: 0 }; }, @@ -41,6 +43,8 @@ BI.VerticalLayoutLogic = BI.inherit(BI.Logic, { rgap: o.rgap, tgap: o.tgap, bgap: o.bgap, + innerHgap: o.innerHgap, + innerVgap: o.innerVgap, items: o.items }; } @@ -68,7 +72,9 @@ BI.HorizontalLayoutLogic = BI.inherit(BI.Logic, { lgap: 0, rgap: 0, tgap: 0, - bgap: 0 + bgap: 0, + innerVgap: 0, + innerHgap: 0 }; }, @@ -90,6 +96,8 @@ BI.HorizontalLayoutLogic = BI.inherit(BI.Logic, { rgap: o.rgap, tgap: o.tgap, bgap: o.bgap, + innerHgap: o.innerHgap, + innerVgap: o.innerVgap, items: o.items }; } @@ -163,7 +171,9 @@ BI.HorizontalFillLayoutLogic = BI.inherit(BI.Logic, { lgap: 0, rgap: 0, tgap: 0, - bgap: 0 + bgap: 0, + innerVgap: 0, + innerHgap: 0 }; }, @@ -190,6 +200,8 @@ BI.HorizontalFillLayoutLogic = BI.inherit(BI.Logic, { rgap: o.rgap, tgap: o.tgap, bgap: o.bgap, + innerHgap: o.innerHgap, + innerVgap: o.innerVgap, items: o.items }; }