Browse Source

feature: 气泡支持品牌色

es6
guy 3 years ago
parent
commit
2cf6e2ec5e
  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,
minHeight: 50
});
},
}
});
BI.shortcut("bi.bubble_popup_view", BI.BubblePopupView);
@ -47,26 +47,29 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
var items = [];
BI.each(o.buttons, function (i, 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 {
items.push(BI.extend({
items.push({
el: BI.extend({
type: "bi.button",
height: 24,
handler: function (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({
type: "bi.center",
height: 54,
rgap: 20,
items: [{
type: "bi.right_vertical_adapt",
lgap: 15,
height: 54,
items: items
}]
});
},
@ -156,7 +159,7 @@ BI.TextBubblePopupBarView = BI.inherit(BI.Widget, {
populate: function (v) {
this.text.setText(v || this.options.text);
},
}
});
BI.TextBubblePopupBarView.EVENT_CHANGE = "EVENT_CLICK_TOOLBAR_BUTTON";
BI.shortcut("bi.text_bubble_bar_popup_view", BI.TextBubblePopupBarView);

Loading…
Cancel
Save