Browse Source

Pull request #2442: feature: 气泡支持品牌色

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit 'e1257d17e977e710008be06b4f267d41f3398ac1':
  feature: 气泡支持品牌色
es6
guy 3 years ago
parent
commit
7ec7430da7
  1. 25
      src/case/combo/bubblecombo/popup.bubble.js

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

@ -13,7 +13,7 @@ BI.BubblePopupView = BI.inherit(BI.PopupView, {
maxWidth: 300, maxWidth: 300,
minHeight: 50 minHeight: 50
}); });
}, }
}); });
BI.shortcut("bi.bubble_popup_view", BI.BubblePopupView); BI.shortcut("bi.bubble_popup_view", BI.BubblePopupView);
@ -47,26 +47,29 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
var items = []; var items = [];
BI.each(o.buttons, function (i, buttonOpt) { BI.each(o.buttons, function (i, buttonOpt) {
if (BI.isWidget(buttonOpt)) { if (BI.isWidget(buttonOpt)) {
items.push(buttonOpt); items.push({
el: buttonOpt,
lgap: i === 0 ? 20 : 15,
rgap: i === o.buttons.length - 1 ? 20 : 0
});
} else { } else {
items.push(BI.extend({ items.push({
el: BI.extend({
type: "bi.button", type: "bi.button",
height: 24, height: 24,
handler: function (v) { handler: function (v) {
self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v); self.fireEvent(BI.BubblePopupBarView.EVENT_CLICK_TOOLBAR_BUTTON, v);
} }
}, buttonOpt)); }, buttonOpt),
lgap: i === 0 ? 20 : 15,
rgap: i === o.buttons.length - 1 ? 20 : 0
});
} }
}); });
return BI.createWidget({ return BI.createWidget({
type: "bi.center",
height: 54,
rgap: 20,
items: [{
type: "bi.right_vertical_adapt", type: "bi.right_vertical_adapt",
lgap: 15, height: 54,
items: items items: items
}]
}); });
}, },
@ -156,7 +159,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
populate: function (v) { populate: function (v) {
this.text.setText(v || this.options.text); this.text.setText(v || this.options.text);
}, }
}); });
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON"; BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView); BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);

Loading…
Cancel
Save