Browse Source

Merge pull request #239028 in DEC/fineui from bugfix/11.0 to feature/x

* commit 'ad754b5820223229ed6d7798a0f1184fcc76887c':
  REPORT-97636 fix: 修改popover取消按钮样式、增加按钮高度可配
research/test
superman 1 year ago
parent
commit
f300daedc3
  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 toastStack = [];
var defaultConfig = {
buttonHeight: 24,
};
return { return {
alert: function (title, message, callback) { alert: function (title, message, callback, config = defaultConfig) {
this._show(false, title, message, callback); this._show(false, title, message, callback, config);
}, },
confirm: function (title, message, callback) { confirm: function (title, message, callback, config = defaultConfig) {
this._show(true, title, message, callback); this._show(true, title, message, callback, config);
}, },
prompt: function (title, message, value, callback, min_width) { prompt: function (title, message, value, callback, min_width) {
// BI.Msg.prompt(title, message, value, callback, min_width); // BI.Msg.prompt(title, message, value, callback, min_width);
@ -74,7 +78,7 @@ BI.Msg = ((function () {
toast.destroy?.(); 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({ BI.isNull($mask) && ($mask = BI.Widget._renderEngine.createElement("<div class=\"bi-z-index-mask\">").css({
position: "absolute", position: "absolute",
zIndex: BI.zIndex_tip - 2, zIndex: BI.zIndex_tip - 2,
@ -105,8 +109,9 @@ BI.Msg = ((function () {
controlItems.push({ controlItems.push({
el: { el: {
type: "bi.button", type: "bi.button",
height: config.buttonHeight,
text: BI.i18nText("BI-Basic_Cancel"), text: BI.i18nText("BI-Basic_Cancel"),
level: "ignore", light: true,
handler: function () { handler: function () {
close(); close();
if (BI.isFunction(callback)) { if (BI.isFunction(callback)) {
@ -119,6 +124,7 @@ BI.Msg = ((function () {
controlItems.push({ controlItems.push({
el: { el: {
type: "bi.button", type: "bi.button",
height: config.buttonHeight,
text: BI.i18nText("BI-Basic_OK"), text: BI.i18nText("BI-Basic_OK"),
handler: function () { handler: function () {
close(); close();

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

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

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

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

Loading…
Cancel
Save