Browse Source

Pull request #2462: KERNEL-9882 GAP的统一配置

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit 'd35aa220115ee260b399361baf132cf46dc51c1d':
  KERNEL-9882 GAP的统一配置
es6
windy 3 years ago
parent
commit
9c5006191a
  1. 38
      src/base/layer/layer.popover.js
  2. 4
      src/case/combo/bubblecombo/popup.bubble.js
  3. 18
      src/core/system.js

38
src/base/layer/layer.popover.js

@ -13,20 +13,22 @@ BI.Popover = BI.inherit(BI.Widget, {
MAX_HEIGHT: 600 MAX_HEIGHT: 600
}, },
props: { props: function () {
baseCls: "bi-popover bi-card bi-border-radius", return {
size: "normal", // small, normal, big baseCls: "bi-popover bi-card bi-border-radius",
logic: { size: "normal", // small, normal, big
dynamic: false logic: {
}, dynamic: false
header: null, },
headerHeight: 40, header: null,
body: null, headerHeight: 40,
footer: null, body: null,
footerHeight: 44, footer: null,
closable: true, // BI-40839 是否显示右上角的关闭按钮 footerHeight: 44,
bodyHgap: 20, closable: true, // BI-40839 是否显示右上角的关闭按钮
bodyTgap: 10 bodyHgap: BI.SIZE_CONSANTS.H_GAP_SIZE,
bodyTgap: 10
};
}, },
render: function () { render: function () {
@ -73,8 +75,8 @@ BI.Popover = BI.inherit(BI.Widget, {
title: o.header, title: o.header,
textAlign: "left" textAlign: "left"
}, },
left: 20, left: BI.SIZE_CONSANTS.H_GAP_SIZE,
right: o.closable ? 0 : 20 right: o.closable ? 0 : BI.SIZE_CONSANTS.H_GAP_SIZE
}] }]
} }
}, o.closable ? { }, o.closable ? {
@ -127,9 +129,9 @@ BI.Popover = BI.inherit(BI.Widget, {
type: "bi.absolute", type: "bi.absolute",
items: [{ items: [{
el: o.footer, el: o.footer,
left: 20, left: BI.SIZE_CONSANTS.H_GAP_SIZE,
top: 0, top: 0,
right: 20, right: BI.SIZE_CONSANTS.H_GAP_SIZE,
bottom: 0 bottom: 0
}], }],
height: o.footerHeight height: o.footerHeight

4
src/case/combo/bubblecombo/popup.bubble.js

@ -82,8 +82,8 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
layouts: [{ layouts: [{
type: "bi.vertical", type: "bi.vertical",
cls: "bar-popup-container", cls: "bar-popup-container",
hgap: 20, hgap: BI.SIZE_CONSANTS.H_GAP_SIZE,
tgap: 15 tgap: BI.SIZE_CONSANTS.V_GAP_SIZE
}] }]
}); });

18
src/core/system.js

@ -16,9 +16,18 @@
LIST_ITEM_HEIGHT: 24, LIST_ITEM_HEIGHT: 24,
TRIGGER_HEIGHT: 24, TRIGGER_HEIGHT: 24,
TOAST_TOP: 10, TOAST_TOP: 10,
H_GAP_SIZE: "M",
V_GAP_SIZE: "M"
} }
}; };
// 具体尺寸还没定,先写着
var sizeMap = {
"S": 16,
"M" : 20,
"L": 24
};
var provider = function () { var provider = function () {
this.SYSTEM = system; this.SYSTEM = system;
@ -50,7 +59,14 @@
return BI.inherit(BI.OB, { return BI.inherit(BI.OB, {
getSize: function () { getSize: function () {
return system.size; var size = system.size;
var H_GAP_SIZE = sizeMap[size.H_GAP_SIZE];
var V_GAP_SIZE = sizeMap[size.V_GAP_SIZE];
return BI.extend({}, size, {
H_GAP_SIZE: H_GAP_SIZE,
V_GAP_SIZE: V_GAP_SIZE
});
}, },
getResponsiveMode: function () { getResponsiveMode: function () {

Loading…
Cancel
Save