ls-pro-common 1.0.84 → 1.0.86

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.
@@ -377,9 +377,7 @@ function ImageSelector(prop) {
377
377
  return loadData(searchKey);
378
378
  }
379
379
  }, nextMarker ? '加载更多' : '刷新')),
380
- getContainer: function getContainer() {
381
- return document.body;
382
- }
380
+ getContainer: false
383
381
  }, modalProps), /*#__PURE__*/React.createElement("div", {
384
382
  style: {
385
383
  minHeight: '120px'
@@ -387,6 +387,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
387
387
  arrowPointAtCenter: arrowPointAtCenter
388
388
  }, /*#__PURE__*/React.createElement(MoreOutlined, {
389
389
  onClick: function onClick(e) {
390
+ if (rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled)) return;
390
391
  setVisible(true);
391
392
  }
392
393
  })),
@@ -427,6 +428,7 @@ var InputTable = /*#__PURE__*/React.forwardRef(function (prop, ref) {
427
428
  arrowPointAtCenter: arrowPointAtCenter
428
429
  }, /*#__PURE__*/React.createElement(MoreOutlined, {
429
430
  onClick: function onClick(e) {
431
+ if (rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled)) return;
430
432
  setVisible(true);
431
433
  }
432
434
  })),
@@ -1,44 +1,44 @@
1
1
  body {
2
- --ant-primary-color: #1869ed;
3
- --ant-primary-color-hover: #418efa;
4
- --ant-primary-color-active: #0a4cc7;
5
- --ant-primary-color-outline: rgba(24, 105, 237, 0.2);
6
- --ant-primary-1: #e6f4ff;
7
- --ant-primary-2: #bddfff;
8
- --ant-primary-3: #94c8ff;
9
- --ant-primary-4: #6baeff;
10
- --ant-primary-5: #418efa;
11
- --ant-primary-6: #1869ed;
12
- --ant-primary-7: #0a4cc7;
13
- --ant-primary-color-deprecated-pure: #bed5fa;
14
- --ant-primary-color-deprecated-l-35: #bed5fa;
15
- --ant-primary-color-deprecated-l-20: #77a6f4;
16
- --ant-primary-color-deprecated-t-20: #4687f1;
17
- --ant-primary-color-deprecated-t-50: #8cb4f6;
18
- --ant-primary-color-deprecated-f-12: rgba(24, 105, 237, 0.12);
2
+ --ant-primary-color : #1869ed;
3
+ --ant-primary-color-hover : #418efa;
4
+ --ant-primary-color-active : #0a4cc7;
5
+ --ant-primary-color-outline : rgba(24, 105, 237, 0.2);
6
+ --ant-primary-1 : #e6f4ff;
7
+ --ant-primary-2 : #bddfff;
8
+ --ant-primary-3 : #94c8ff;
9
+ --ant-primary-4 : #6baeff;
10
+ --ant-primary-5 : #418efa;
11
+ --ant-primary-6 : #1869ed;
12
+ --ant-primary-7 : #0a4cc7;
13
+ --ant-primary-color-deprecated-pure : #bed5fa;
14
+ --ant-primary-color-deprecated-l-35 : #bed5fa;
15
+ --ant-primary-color-deprecated-l-20 : #77a6f4;
16
+ --ant-primary-color-deprecated-t-20 : #4687f1;
17
+ --ant-primary-color-deprecated-t-50 : #8cb4f6;
18
+ --ant-primary-color-deprecated-f-12 : rgba(24, 105, 237, 0.12);
19
19
  --ant-primary-color-active-deprecated-f-30: rgba(230, 244, 255, 0.3);
20
20
  --ant-primary-color-active-deprecated-d-02: #dcf0ff;
21
- --ant-success-color: #52c41a;
22
- --ant-success-color-hover: #73d13d;
23
- --ant-success-color-active: #389e0d;
24
- --ant-success-color-outline: rgba(82, 196, 26, 0.2);
25
- --ant-success-color-deprecated-bg: #f6ffed;
26
- --ant-success-color-deprecated-border: #b7eb8f;
27
- --ant-error-color: #ff4d4f;
28
- --ant-error-color-hover: #ff7875;
29
- --ant-error-color-active: #d9363e;
30
- --ant-error-color-outline: rgba(255, 77, 79, 0.2);
31
- --ant-error-color-deprecated-bg: #fff2f0;
32
- --ant-error-color-deprecated-border: #ffccc7;
33
- --ant-warning-color: #faad14;
34
- --ant-warning-color-hover: #ffc53d;
35
- --ant-warning-color-active: #d48806;
36
- --ant-warning-color-outline: rgba(250, 173, 20, 0.2);
37
- --ant-warning-color-deprecated-bg: #fffbe6;
38
- --ant-warning-color-deprecated-border: #ffe58f;
39
- --ant-info-color: #1869ed;
40
- --ant-info-color-deprecated-bg: #e6f4ff;
41
- --ant-info-color-deprecated-border: #94c8ff;
21
+ --ant-success-color : #52c41a;
22
+ --ant-success-color-hover : #73d13d;
23
+ --ant-success-color-active : #389e0d;
24
+ --ant-success-color-outline : rgba(82, 196, 26, 0.2);
25
+ --ant-success-color-deprecated-bg : #f6ffed;
26
+ --ant-success-color-deprecated-border : #b7eb8f;
27
+ --ant-error-color : #ff4d4f;
28
+ --ant-error-color-hover : #ff7875;
29
+ --ant-error-color-active : #d9363e;
30
+ --ant-error-color-outline : rgba(255, 77, 79, 0.2);
31
+ --ant-error-color-deprecated-bg : #fff2f0;
32
+ --ant-error-color-deprecated-border : #ffccc7;
33
+ --ant-warning-color : #faad14;
34
+ --ant-warning-color-hover : #ffc53d;
35
+ --ant-warning-color-active : #d48806;
36
+ --ant-warning-color-outline : rgba(250, 173, 20, 0.2);
37
+ --ant-warning-color-deprecated-bg : #fffbe6;
38
+ --ant-warning-color-deprecated-border : #ffe58f;
39
+ --ant-info-color : #1869ed;
40
+ --ant-info-color-deprecated-bg : #e6f4ff;
41
+ --ant-info-color-deprecated-border : #94c8ff;
42
42
 
43
43
  // --ant-primary-color : #4997E6;
44
44
  // --ant-primary-color-hover : #74b7f2;
@@ -335,4 +335,11 @@ a:hover {
335
335
  .ant-input-clear-icon {
336
336
  visibility: visible;
337
337
  }
338
+ }
339
+
340
+ .ant-modal-confirm-body {
341
+ .ant-modal-confirm-content {
342
+ max-height: 60vh;
343
+ overflow : auto;
344
+ }
338
345
  }
@@ -1,3 +1,4 @@
1
+ import { ModalFuncProps } from 'antd';
1
2
  import ReactDOM from 'react-dom';
2
3
  import React from 'react';
3
4
  export { getUrlQuery, setUrlQuery, toGatewayUrl, dateFormat, getResourceProps } from 'ls-pro-table';
@@ -100,11 +101,17 @@ export declare const showError: (text: string) => void;
100
101
  export declare const showWarn: (text: string) => void;
101
102
  /** @name 显示成功 */
102
103
  export declare const showSuccess: (text: string) => void;
103
- export declare const showAlert: (text: React.ReactDOM, title?: string, type?: 'error' | 'info' | 'success' | 'warn') => {
104
- destroy: () => void;
105
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
106
- };
107
- export declare const httpError: (retMsg?: string | undefined, retCode?: string | undefined, faultCode?: string | undefined, url?: string | undefined) => void;
104
+ export declare const getFullScreenElement: () => any;
105
+ /**
106
+ * 弹框提示
107
+ * @param text 提示信息
108
+ * @param title 标题,默认 系统提示
109
+ * @param type 类型
110
+ * @param opts 附加参数
111
+ * @returns Promise<Boolean>
112
+ */
113
+ export declare const showAlert: (text: React.ReactDOM | string, title?: string, type?: 'error' | 'info' | 'success' | 'warn', opts?: ModalFuncProps) => Promise<unknown>;
114
+ export declare const httpError: (retMsg?: string | undefined, retCode?: string | undefined, faultCode?: string | undefined, opts?: ModalFuncProps) => Promise<unknown>;
108
115
  export declare const exitAlert: () => void;
109
116
  /** @name 显示确认 */
110
117
  export declare const showConfirm: (text: string, title?: string) => Promise<unknown>;
package/es/utils/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import "antd/es/spin/style";
2
2
  import _Spin from "antd/es/spin";
3
3
  import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIteratorHelper";
4
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
4
5
  import "antd/es/modal/style";
5
6
  import _Modal from "antd/es/modal";
6
7
  import "antd/es/message/style";
@@ -226,8 +227,13 @@ export var clearCache = function clearCache(key) {
226
227
  session ? sessionStorage.clear() : localStorage.clear();
227
228
  }
228
229
  };
230
+
231
+ _message.config({
232
+ maxCount: 1
233
+ });
229
234
  /** @name 显示错误 */
230
235
 
236
+
231
237
  export var showError = function showError(text) {
232
238
  _message.error(text);
233
239
  };
@@ -241,35 +247,41 @@ export var showWarn = function showWarn(text) {
241
247
  export var showSuccess = function showSuccess(text) {
242
248
  _message.success(text);
243
249
  };
250
+ export var getFullScreenElement = function getFullScreenElement() {
251
+ //@ts-ignore
252
+ return document.fullscreenElement || document.mozFullScreenElement || document.msFullScreenElement || document.webkitFullscreenElement || null;
253
+ };
254
+ /**
255
+ * 弹框提示
256
+ * @param text 提示信息
257
+ * @param title 标题,默认 系统提示
258
+ * @param type 类型
259
+ * @param opts 附加参数
260
+ * @returns Promise<Boolean>
261
+ */
262
+
244
263
  export var showAlert = function showAlert(text) {
245
264
  var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '系统提示';
246
265
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'error';
247
-
248
- if (type === 'success') {
249
- return _Modal.success({
250
- title: title,
251
- content: text
252
- });
253
- } else if (type === 'error') {
254
- return _Modal.error({
255
- title: title,
256
- content: text
257
- });
258
- } else if (type === 'warn') {
259
- return _Modal.warn({
266
+ var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
267
+ return new Promise(function (resolve, reject) {
268
+ _Modal[type](_objectSpread({
269
+ content: text,
260
270
  title: title,
261
- content: text
262
- });
263
- }
264
-
265
- return _Modal.info({
266
- title: title,
267
- content: text
271
+ getContainer: getFullScreenElement() || false,
272
+ onOk: function onOk() {
273
+ resolve(true);
274
+ },
275
+ onCancel: function onCancel() {
276
+ reject(false);
277
+ }
278
+ }, opts));
268
279
  });
269
280
  };
270
- export var httpError = function httpError(retMsg, retCode, faultCode, url) {
281
+ export var httpError = function httpError(retMsg, retCode, faultCode) {
282
+ var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
271
283
  var msg = /*#__PURE__*/React.createElement(React.Fragment, null, "\u9519\u8BEF\u539F\u56E0:", /*#__PURE__*/React.createElement("b", null, retMsg), /*#__PURE__*/React.createElement("br", null), "\u9519\u8BEF\u7801:", /*#__PURE__*/React.createElement("b", null, retCode), /*#__PURE__*/React.createElement("br", null), "\u6545\u969C\u7801:", /*#__PURE__*/React.createElement("b", null, faultCode));
272
- showAlert(msg, '请求接口出错', 'error');
284
+ return showAlert(msg, '请求接口出错', 'error', opts);
273
285
  };
274
286
  export var exitAlert = function exitAlert() {
275
287
  _Modal.destroyAll();
@@ -407,9 +407,7 @@ function ImageSelector(prop) {
407
407
  return loadData(searchKey);
408
408
  }
409
409
  }, nextMarker ? '加载更多' : '刷新')),
410
- getContainer: function getContainer() {
411
- return document.body;
412
- }
410
+ getContainer: false
413
411
  }, modalProps), /*#__PURE__*/_react.default.createElement("div", {
414
412
  style: {
415
413
  minHeight: '120px'
@@ -417,6 +417,7 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
417
417
  arrowPointAtCenter: arrowPointAtCenter
418
418
  }, /*#__PURE__*/_react.default.createElement(_icons.MoreOutlined, {
419
419
  onClick: function onClick(e) {
420
+ if (rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled)) return;
420
421
  setVisible(true);
421
422
  }
422
423
  })),
@@ -457,6 +458,7 @@ var InputTable = /*#__PURE__*/_react.default.forwardRef(function (prop, ref) {
457
458
  arrowPointAtCenter: arrowPointAtCenter
458
459
  }, /*#__PURE__*/_react.default.createElement(_icons.MoreOutlined, {
459
460
  onClick: function onClick(e) {
461
+ if (rest.disabled || (fieldProps === null || fieldProps === void 0 ? void 0 : fieldProps.disabled)) return;
460
462
  setVisible(true);
461
463
  }
462
464
  })),
@@ -1,44 +1,44 @@
1
1
  body {
2
- --ant-primary-color: #1869ed;
3
- --ant-primary-color-hover: #418efa;
4
- --ant-primary-color-active: #0a4cc7;
5
- --ant-primary-color-outline: rgba(24, 105, 237, 0.2);
6
- --ant-primary-1: #e6f4ff;
7
- --ant-primary-2: #bddfff;
8
- --ant-primary-3: #94c8ff;
9
- --ant-primary-4: #6baeff;
10
- --ant-primary-5: #418efa;
11
- --ant-primary-6: #1869ed;
12
- --ant-primary-7: #0a4cc7;
13
- --ant-primary-color-deprecated-pure: #bed5fa;
14
- --ant-primary-color-deprecated-l-35: #bed5fa;
15
- --ant-primary-color-deprecated-l-20: #77a6f4;
16
- --ant-primary-color-deprecated-t-20: #4687f1;
17
- --ant-primary-color-deprecated-t-50: #8cb4f6;
18
- --ant-primary-color-deprecated-f-12: rgba(24, 105, 237, 0.12);
2
+ --ant-primary-color : #1869ed;
3
+ --ant-primary-color-hover : #418efa;
4
+ --ant-primary-color-active : #0a4cc7;
5
+ --ant-primary-color-outline : rgba(24, 105, 237, 0.2);
6
+ --ant-primary-1 : #e6f4ff;
7
+ --ant-primary-2 : #bddfff;
8
+ --ant-primary-3 : #94c8ff;
9
+ --ant-primary-4 : #6baeff;
10
+ --ant-primary-5 : #418efa;
11
+ --ant-primary-6 : #1869ed;
12
+ --ant-primary-7 : #0a4cc7;
13
+ --ant-primary-color-deprecated-pure : #bed5fa;
14
+ --ant-primary-color-deprecated-l-35 : #bed5fa;
15
+ --ant-primary-color-deprecated-l-20 : #77a6f4;
16
+ --ant-primary-color-deprecated-t-20 : #4687f1;
17
+ --ant-primary-color-deprecated-t-50 : #8cb4f6;
18
+ --ant-primary-color-deprecated-f-12 : rgba(24, 105, 237, 0.12);
19
19
  --ant-primary-color-active-deprecated-f-30: rgba(230, 244, 255, 0.3);
20
20
  --ant-primary-color-active-deprecated-d-02: #dcf0ff;
21
- --ant-success-color: #52c41a;
22
- --ant-success-color-hover: #73d13d;
23
- --ant-success-color-active: #389e0d;
24
- --ant-success-color-outline: rgba(82, 196, 26, 0.2);
25
- --ant-success-color-deprecated-bg: #f6ffed;
26
- --ant-success-color-deprecated-border: #b7eb8f;
27
- --ant-error-color: #ff4d4f;
28
- --ant-error-color-hover: #ff7875;
29
- --ant-error-color-active: #d9363e;
30
- --ant-error-color-outline: rgba(255, 77, 79, 0.2);
31
- --ant-error-color-deprecated-bg: #fff2f0;
32
- --ant-error-color-deprecated-border: #ffccc7;
33
- --ant-warning-color: #faad14;
34
- --ant-warning-color-hover: #ffc53d;
35
- --ant-warning-color-active: #d48806;
36
- --ant-warning-color-outline: rgba(250, 173, 20, 0.2);
37
- --ant-warning-color-deprecated-bg: #fffbe6;
38
- --ant-warning-color-deprecated-border: #ffe58f;
39
- --ant-info-color: #1869ed;
40
- --ant-info-color-deprecated-bg: #e6f4ff;
41
- --ant-info-color-deprecated-border: #94c8ff;
21
+ --ant-success-color : #52c41a;
22
+ --ant-success-color-hover : #73d13d;
23
+ --ant-success-color-active : #389e0d;
24
+ --ant-success-color-outline : rgba(82, 196, 26, 0.2);
25
+ --ant-success-color-deprecated-bg : #f6ffed;
26
+ --ant-success-color-deprecated-border : #b7eb8f;
27
+ --ant-error-color : #ff4d4f;
28
+ --ant-error-color-hover : #ff7875;
29
+ --ant-error-color-active : #d9363e;
30
+ --ant-error-color-outline : rgba(255, 77, 79, 0.2);
31
+ --ant-error-color-deprecated-bg : #fff2f0;
32
+ --ant-error-color-deprecated-border : #ffccc7;
33
+ --ant-warning-color : #faad14;
34
+ --ant-warning-color-hover : #ffc53d;
35
+ --ant-warning-color-active : #d48806;
36
+ --ant-warning-color-outline : rgba(250, 173, 20, 0.2);
37
+ --ant-warning-color-deprecated-bg : #fffbe6;
38
+ --ant-warning-color-deprecated-border : #ffe58f;
39
+ --ant-info-color : #1869ed;
40
+ --ant-info-color-deprecated-bg : #e6f4ff;
41
+ --ant-info-color-deprecated-border : #94c8ff;
42
42
 
43
43
  // --ant-primary-color : #4997E6;
44
44
  // --ant-primary-color-hover : #74b7f2;
@@ -335,4 +335,11 @@ a:hover {
335
335
  .ant-input-clear-icon {
336
336
  visibility: visible;
337
337
  }
338
+ }
339
+
340
+ .ant-modal-confirm-body {
341
+ .ant-modal-confirm-content {
342
+ max-height: 60vh;
343
+ overflow : auto;
344
+ }
338
345
  }
@@ -1,3 +1,4 @@
1
+ import { ModalFuncProps } from 'antd';
1
2
  import ReactDOM from 'react-dom';
2
3
  import React from 'react';
3
4
  export { getUrlQuery, setUrlQuery, toGatewayUrl, dateFormat, getResourceProps } from 'ls-pro-table';
@@ -100,11 +101,17 @@ export declare const showError: (text: string) => void;
100
101
  export declare const showWarn: (text: string) => void;
101
102
  /** @name 显示成功 */
102
103
  export declare const showSuccess: (text: string) => void;
103
- export declare const showAlert: (text: React.ReactDOM, title?: string, type?: 'error' | 'info' | 'success' | 'warn') => {
104
- destroy: () => void;
105
- update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
106
- };
107
- export declare const httpError: (retMsg?: string | undefined, retCode?: string | undefined, faultCode?: string | undefined, url?: string | undefined) => void;
104
+ export declare const getFullScreenElement: () => any;
105
+ /**
106
+ * 弹框提示
107
+ * @param text 提示信息
108
+ * @param title 标题,默认 系统提示
109
+ * @param type 类型
110
+ * @param opts 附加参数
111
+ * @returns Promise<Boolean>
112
+ */
113
+ export declare const showAlert: (text: React.ReactDOM | string, title?: string, type?: 'error' | 'info' | 'success' | 'warn', opts?: ModalFuncProps) => Promise<unknown>;
114
+ export declare const httpError: (retMsg?: string | undefined, retCode?: string | undefined, faultCode?: string | undefined, opts?: ModalFuncProps) => Promise<unknown>;
108
115
  export declare const exitAlert: () => void;
109
116
  /** @name 显示确认 */
110
117
  export declare const showConfirm: (text: string, title?: string) => Promise<unknown>;
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "dateFormat", {
12
12
  return _lsProTable.dateFormat;
13
13
  }
14
14
  });
15
- exports.getLoginName = exports.getCookie = exports.getCompanyId = exports.getCache = exports.formatMoney = exports.formatDate = exports.exitLoading = exports.exitAlert = exports.deepClone = exports.debounce = void 0;
15
+ exports.getLoginName = exports.getFullScreenElement = exports.getCookie = exports.getCompanyId = exports.getCache = exports.formatMoney = exports.formatDate = exports.exitLoading = exports.exitAlert = exports.deepClone = exports.debounce = void 0;
16
16
  Object.defineProperty(exports, "getResourceProps", {
17
17
  enumerable: true,
18
18
  get: function get() {
@@ -47,6 +47,8 @@ var _spin = _interopRequireDefault(require("antd/es/spin"));
47
47
 
48
48
  var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
49
49
 
50
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
51
+
50
52
  require("antd/es/modal/style");
51
53
 
52
54
  var _modal = _interopRequireDefault(require("antd/es/modal"));
@@ -316,11 +318,15 @@ var clearCache = function clearCache(key) {
316
318
  session ? sessionStorage.clear() : localStorage.clear();
317
319
  }
318
320
  };
319
- /** @name 显示错误 */
320
-
321
321
 
322
322
  exports.clearCache = clearCache;
323
323
 
324
+ _message2.default.config({
325
+ maxCount: 1
326
+ });
327
+ /** @name 显示错误 */
328
+
329
+
324
330
  var showError = function showError(text) {
325
331
  _message2.default.error(text);
326
332
  };
@@ -343,39 +349,49 @@ var showSuccess = function showSuccess(text) {
343
349
 
344
350
  exports.showSuccess = showSuccess;
345
351
 
352
+ var getFullScreenElement = function getFullScreenElement() {
353
+ //@ts-ignore
354
+ return document.fullscreenElement || document.mozFullScreenElement || document.msFullScreenElement || document.webkitFullscreenElement || null;
355
+ };
356
+ /**
357
+ * 弹框提示
358
+ * @param text 提示信息
359
+ * @param title 标题,默认 系统提示
360
+ * @param type 类型
361
+ * @param opts 附加参数
362
+ * @returns Promise<Boolean>
363
+ */
364
+
365
+
366
+ exports.getFullScreenElement = getFullScreenElement;
367
+
346
368
  var showAlert = function showAlert(text) {
347
369
  var title = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '系统提示';
348
370
  var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'error';
349
-
350
- if (type === 'success') {
351
- return _modal.default.success({
352
- title: title,
353
- content: text
354
- });
355
- } else if (type === 'error') {
356
- return _modal.default.error({
357
- title: title,
358
- content: text
359
- });
360
- } else if (type === 'warn') {
361
- return _modal.default.warn({
371
+ var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
372
+ return new Promise(function (resolve, reject) {
373
+ _modal.default[type]((0, _objectSpread2.default)({
374
+ content: text,
362
375
  title: title,
363
- content: text
364
- });
365
- }
366
-
367
- return _modal.default.info({
368
- title: title,
369
- content: text
376
+ getContainer: getFullScreenElement() || false,
377
+ onOk: function onOk() {
378
+ resolve(true);
379
+ },
380
+ onCancel: function onCancel() {
381
+ reject(false);
382
+ }
383
+ }, opts));
370
384
  });
371
385
  };
372
386
 
373
387
  exports.showAlert = showAlert;
374
388
 
375
- var httpError = function httpError(retMsg, retCode, faultCode, url) {
389
+ var httpError = function httpError(retMsg, retCode, faultCode) {
390
+ var opts = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
391
+
376
392
  var msg = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, "\u9519\u8BEF\u539F\u56E0:", /*#__PURE__*/_react.default.createElement("b", null, retMsg), /*#__PURE__*/_react.default.createElement("br", null), "\u9519\u8BEF\u7801:", /*#__PURE__*/_react.default.createElement("b", null, retCode), /*#__PURE__*/_react.default.createElement("br", null), "\u6545\u969C\u7801:", /*#__PURE__*/_react.default.createElement("b", null, faultCode));
377
393
 
378
- showAlert(msg, '请求接口出错', 'error');
394
+ return showAlert(msg, '请求接口出错', 'error', opts);
379
395
  };
380
396
 
381
397
  exports.httpError = httpError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ls-pro-common",
3
- "version": "1.0.84",
3
+ "version": "1.0.86",
4
4
  "description": "ls-pro-common",
5
5
  "keywords": [
6
6
  "antd",
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@ant-design/icons": "^4.3.0",
30
- "ls-pro-table": "2.62.62",
30
+ "ls-pro-table": "2.62.63",
31
31
  "ls-pro-form": "1.52.34",
32
32
  "ls-pro-descriptions":"^1.10.33",
33
33
  "@babel/runtime": "^7.16.3",