Browse Source

Merge pull request #239285 in DEC/fineui from release/11.0 to final/11.0

* commit '30d8f2000876f1b792c1eac5c17e9fabe29d97b3':
  REPORT-97636 fix: 修改popover取消按钮样式、增加按钮高度可配
research/test
superman 11 months ago
parent
commit
0b3c18f4d8
  1. 18
      src/base/foundation/message.js
  2. 5
      src/base/layer/layer.popover.js
  3. 2
      src/case/combo/bubblecombo/popup.bubble.js

18
src/base/foundation/message.js

@ -10,12 +10,16 @@ BI.Msg = ((function () {
var toastStack = [];
var defaultConfig = {
buttonHeight: 24,
};
return {
alert: function (title, message, callback) {
this._show(false, title, message, callback);
alert: function (title, message, callback, config = defaultConfig) {
this._show(false, title, message, callback, config);
},
confirm: function (title, message, callback) {
this._show(true, title, message, callback);
confirm: function (title, message, callback, config = defaultConfig) {
this._show(true, title, message, callback, config);
},
prompt: function (title, message, value, callback, min_width) {
// BI.Msg.prompt(title, message, value, callback, min_width);
@ -74,7 +78,7 @@ BI.Msg = ((function () {
toast.destroy?.();
};
},
_show: function (hasCancel, title, message, callback) {
_show: function (hasCancel, title, message, callback, config) {
BI.isNull($mask) && ($mask = BI.Widget._renderEngine.createElement("<div class=\"bi-z-index-mask\">").css({
position: "absolute",
zIndex: BI.zIndex_tip - 2,
@ -105,8 +109,9 @@ BI.Msg = ((function () {
controlItems.push({
el: {
type: "bi.button",
height: config.buttonHeight,
text: BI.i18nText("BI-Basic_Cancel"),
level: "ignore",
light: true,
handler: function () {
close();
if (BI.isFunction(callback)) {
@ -119,6 +124,7 @@ BI.Msg = ((function () {
controlItems.push({
el: {
type: "bi.button",
height: config.buttonHeight,
text: BI.i18nText("BI-Basic_OK"),
handler: function () {
close();

5
src/base/layer/layer.popover.js

@ -25,6 +25,7 @@ BI.Popover = BI.inherit(BI.Widget, {
body: null,
footer: null,
footerHeight: 44,
footerButtonHeight: 24,
closable: true, // BI-40839 是否显示右上角的关闭按钮
bodyHgap: BI.SIZE_CONSANTS.H_GAP_SIZE,
bodyTgap: BI.SIZE_CONSANTS.V_GAP_SIZE,
@ -249,15 +250,17 @@ BI.BarPopover = BI.inherit(BI.Popover, {
lgap: 10,
items: [{
type: "bi.button",
height: o.footerButtonHeight,
text: this.options.btns[1],
value: 1,
level: "ignore",
light: true,
handler: function (v) {
self.fireEvent(BI.Popover.EVENT_CANCEL, v);
self.close(v);
},
}, {
type: "bi.button",
height: o.footerButtonHeight,
text: this.options.btns[0],
warningTitle: o.warningTitle,
value: 0,

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

@ -32,7 +32,7 @@ BI.BubblePopupBarView = BI.inherit(BI.BubblePopupView, {
buttons: [{
value: false,
text: BI.i18nText("BI-Basic_Cancel"),
level: "ignore"
light: true,
}, {
text: BI.i18nText(BI.i18nText("BI-Basic_OK")),
value: true

Loading…
Cancel
Save