ls-pro-common 1.0.86 → 1.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common.js +1 -1
- package/dist/common.min.js +1 -1
- package/es/utils/index.js +21 -5
- package/lib/utils/index.js +21 -5
- package/package.json +1 -1
package/es/utils/index.js
CHANGED
|
@@ -235,21 +235,36 @@ _message.config({
|
|
|
235
235
|
|
|
236
236
|
|
|
237
237
|
export var showError = function showError(text) {
|
|
238
|
-
_message.error(
|
|
238
|
+
_message.error({
|
|
239
|
+
content: text,
|
|
240
|
+
getPopupContainer: function getPopupContainer(e) {
|
|
241
|
+
return getFullScreenElement();
|
|
242
|
+
}
|
|
243
|
+
});
|
|
239
244
|
};
|
|
240
245
|
/** @name 显示警示 */
|
|
241
246
|
|
|
242
247
|
export var showWarn = function showWarn(text) {
|
|
243
|
-
_message.warn(
|
|
248
|
+
_message.warn({
|
|
249
|
+
content: text,
|
|
250
|
+
getPopupContainer: function getPopupContainer(e) {
|
|
251
|
+
return getFullScreenElement();
|
|
252
|
+
}
|
|
253
|
+
});
|
|
244
254
|
};
|
|
245
255
|
/** @name 显示成功 */
|
|
246
256
|
|
|
247
257
|
export var showSuccess = function showSuccess(text) {
|
|
248
|
-
_message.success(
|
|
258
|
+
_message.success({
|
|
259
|
+
content: text,
|
|
260
|
+
getPopupContainer: function getPopupContainer(e) {
|
|
261
|
+
return getFullScreenElement();
|
|
262
|
+
}
|
|
263
|
+
});
|
|
249
264
|
};
|
|
250
265
|
export var getFullScreenElement = function getFullScreenElement() {
|
|
251
266
|
//@ts-ignore
|
|
252
|
-
return document.fullscreenElement || document.mozFullScreenElement || document.msFullScreenElement || document.webkitFullscreenElement ||
|
|
267
|
+
return document.fullscreenElement || document.mozFullScreenElement || document.msFullScreenElement || document.webkitFullscreenElement || undefined;
|
|
253
268
|
};
|
|
254
269
|
/**
|
|
255
270
|
* 弹框提示
|
|
@@ -268,7 +283,7 @@ export var showAlert = function showAlert(text) {
|
|
|
268
283
|
_Modal[type](_objectSpread({
|
|
269
284
|
content: text,
|
|
270
285
|
title: title,
|
|
271
|
-
getContainer: getFullScreenElement()
|
|
286
|
+
getContainer: getFullScreenElement(),
|
|
272
287
|
onOk: function onOk() {
|
|
273
288
|
resolve(true);
|
|
274
289
|
},
|
|
@@ -297,6 +312,7 @@ export var showConfirm = function showConfirm(text) {
|
|
|
297
312
|
icon: /*#__PURE__*/React.createElement(QuestionCircleOutlined, null),
|
|
298
313
|
okType: 'danger',
|
|
299
314
|
closable: true,
|
|
315
|
+
getContainer: getFullScreenElement(),
|
|
300
316
|
onOk: function onOk() {
|
|
301
317
|
resolve(true);
|
|
302
318
|
},
|
package/lib/utils/index.js
CHANGED
|
@@ -328,7 +328,12 @@ _message2.default.config({
|
|
|
328
328
|
|
|
329
329
|
|
|
330
330
|
var showError = function showError(text) {
|
|
331
|
-
_message2.default.error(
|
|
331
|
+
_message2.default.error({
|
|
332
|
+
content: text,
|
|
333
|
+
getPopupContainer: function getPopupContainer(e) {
|
|
334
|
+
return getFullScreenElement();
|
|
335
|
+
}
|
|
336
|
+
});
|
|
332
337
|
};
|
|
333
338
|
/** @name 显示警示 */
|
|
334
339
|
|
|
@@ -336,7 +341,12 @@ var showError = function showError(text) {
|
|
|
336
341
|
exports.showError = showError;
|
|
337
342
|
|
|
338
343
|
var showWarn = function showWarn(text) {
|
|
339
|
-
_message2.default.warn(
|
|
344
|
+
_message2.default.warn({
|
|
345
|
+
content: text,
|
|
346
|
+
getPopupContainer: function getPopupContainer(e) {
|
|
347
|
+
return getFullScreenElement();
|
|
348
|
+
}
|
|
349
|
+
});
|
|
340
350
|
};
|
|
341
351
|
/** @name 显示成功 */
|
|
342
352
|
|
|
@@ -344,14 +354,19 @@ var showWarn = function showWarn(text) {
|
|
|
344
354
|
exports.showWarn = showWarn;
|
|
345
355
|
|
|
346
356
|
var showSuccess = function showSuccess(text) {
|
|
347
|
-
_message2.default.success(
|
|
357
|
+
_message2.default.success({
|
|
358
|
+
content: text,
|
|
359
|
+
getPopupContainer: function getPopupContainer(e) {
|
|
360
|
+
return getFullScreenElement();
|
|
361
|
+
}
|
|
362
|
+
});
|
|
348
363
|
};
|
|
349
364
|
|
|
350
365
|
exports.showSuccess = showSuccess;
|
|
351
366
|
|
|
352
367
|
var getFullScreenElement = function getFullScreenElement() {
|
|
353
368
|
//@ts-ignore
|
|
354
|
-
return document.fullscreenElement || document.mozFullScreenElement || document.msFullScreenElement || document.webkitFullscreenElement ||
|
|
369
|
+
return document.fullscreenElement || document.mozFullScreenElement || document.msFullScreenElement || document.webkitFullscreenElement || undefined;
|
|
355
370
|
};
|
|
356
371
|
/**
|
|
357
372
|
* 弹框提示
|
|
@@ -373,7 +388,7 @@ var showAlert = function showAlert(text) {
|
|
|
373
388
|
_modal.default[type]((0, _objectSpread2.default)({
|
|
374
389
|
content: text,
|
|
375
390
|
title: title,
|
|
376
|
-
getContainer: getFullScreenElement()
|
|
391
|
+
getContainer: getFullScreenElement(),
|
|
377
392
|
onOk: function onOk() {
|
|
378
393
|
resolve(true);
|
|
379
394
|
},
|
|
@@ -413,6 +428,7 @@ var showConfirm = function showConfirm(text) {
|
|
|
413
428
|
icon: /*#__PURE__*/_react.default.createElement(_icons.QuestionCircleOutlined, null),
|
|
414
429
|
okType: 'danger',
|
|
415
430
|
closable: true,
|
|
431
|
+
getContainer: getFullScreenElement(),
|
|
416
432
|
onOk: function onOk() {
|
|
417
433
|
resolve(true);
|
|
418
434
|
},
|