ls-pro-common 1.0.87 → 1.0.88

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/es/http/index.js CHANGED
@@ -43,7 +43,7 @@ request.interceptors.request.use(function (url, options) {
43
43
  options.headers['x-asm-prefer-tag'] = tag;
44
44
  }
45
45
 
46
- url = url.replace('noToken=1', '').replace('&&', '&').replace('?&', '?');
46
+ url = url.replace('&noToken=1', '').replace('noToken=1', '');
47
47
  var param = {
48
48
  resCode: getUrlQuery('resCode') || getUrlQuery('resourceId') || getResourceProps('resourceId'),
49
49
  _t1: Date.now()
@@ -168,6 +168,9 @@ function ajax(url) {
168
168
 
169
169
  if (loadText) {
170
170
  showLoading(loadText);
171
+ url = setUrlQuery(url, {
172
+ _loading: ''
173
+ }).replace('&_loading=', '').replace('_loading=', '');
171
174
  }
172
175
 
173
176
  if (type === 'get') {
package/es/utils/index.js CHANGED
@@ -238,7 +238,7 @@ export var showError = function showError(text) {
238
238
  _message.error({
239
239
  content: text,
240
240
  getPopupContainer: function getPopupContainer(e) {
241
- return getFullScreenElement();
241
+ return getFullScreenElement() || document.body;
242
242
  }
243
243
  });
244
244
  };
@@ -248,7 +248,7 @@ export var showWarn = function showWarn(text) {
248
248
  _message.warn({
249
249
  content: text,
250
250
  getPopupContainer: function getPopupContainer(e) {
251
- return getFullScreenElement();
251
+ return getFullScreenElement() || document.body;
252
252
  }
253
253
  });
254
254
  };
@@ -258,7 +258,7 @@ export var showSuccess = function showSuccess(text) {
258
258
  _message.success({
259
259
  content: text,
260
260
  getPopupContainer: function getPopupContainer(e) {
261
- return getFullScreenElement();
261
+ return getFullScreenElement() || document.body;
262
262
  }
263
263
  });
264
264
  };
@@ -283,7 +283,7 @@ export var showAlert = function showAlert(text) {
283
283
  _Modal[type](_objectSpread({
284
284
  content: text,
285
285
  title: title,
286
- getContainer: getFullScreenElement(),
286
+ getContainer: getFullScreenElement() || document.body,
287
287
  onOk: function onOk() {
288
288
  resolve(true);
289
289
  },
@@ -312,7 +312,7 @@ export var showConfirm = function showConfirm(text) {
312
312
  icon: /*#__PURE__*/React.createElement(QuestionCircleOutlined, null),
313
313
  okType: 'danger',
314
314
  closable: true,
315
- getContainer: getFullScreenElement(),
315
+ getContainer: getFullScreenElement() || document.body,
316
316
  onOk: function onOk() {
317
317
  resolve(true);
318
318
  },
@@ -763,7 +763,8 @@ export var showLoading = function showLoading() {
763
763
  ReactDOM.render( /*#__PURE__*/React.createElement(_Spin, {
764
764
  tip: text
765
765
  }), loadWrapper);
766
- document.body.appendChild(loadWrapper);
766
+ var pNode = getFullScreenElement() || document.body;
767
+ pNode.appendChild(loadWrapper);
767
768
  };
768
769
  export var exitLoading = function exitLoading() {
769
770
  var loading = document.getElementById('myloading');
package/lib/http/index.js CHANGED
@@ -62,7 +62,7 @@ request.interceptors.request.use(function (url, options) {
62
62
  options.headers['x-asm-prefer-tag'] = tag;
63
63
  }
64
64
 
65
- url = url.replace('noToken=1', '').replace('&&', '&').replace('?&', '?');
65
+ url = url.replace('&noToken=1', '').replace('noToken=1', '');
66
66
  var param = {
67
67
  resCode: (0, _utils.getUrlQuery)('resCode') || (0, _utils.getUrlQuery)('resourceId') || (0, _utils.getResourceProps)('resourceId'),
68
68
  _t1: Date.now()
@@ -187,6 +187,9 @@ function ajax(url) {
187
187
 
188
188
  if (loadText) {
189
189
  (0, _utils.showLoading)(loadText);
190
+ url = (0, _utils.setUrlQuery)(url, {
191
+ _loading: ''
192
+ }).replace('&_loading=', '').replace('_loading=', '');
190
193
  }
191
194
 
192
195
  if (type === 'get') {
@@ -331,7 +331,7 @@ var showError = function showError(text) {
331
331
  _message2.default.error({
332
332
  content: text,
333
333
  getPopupContainer: function getPopupContainer(e) {
334
- return getFullScreenElement();
334
+ return getFullScreenElement() || document.body;
335
335
  }
336
336
  });
337
337
  };
@@ -344,7 +344,7 @@ var showWarn = function showWarn(text) {
344
344
  _message2.default.warn({
345
345
  content: text,
346
346
  getPopupContainer: function getPopupContainer(e) {
347
- return getFullScreenElement();
347
+ return getFullScreenElement() || document.body;
348
348
  }
349
349
  });
350
350
  };
@@ -357,7 +357,7 @@ var showSuccess = function showSuccess(text) {
357
357
  _message2.default.success({
358
358
  content: text,
359
359
  getPopupContainer: function getPopupContainer(e) {
360
- return getFullScreenElement();
360
+ return getFullScreenElement() || document.body;
361
361
  }
362
362
  });
363
363
  };
@@ -388,7 +388,7 @@ var showAlert = function showAlert(text) {
388
388
  _modal.default[type]((0, _objectSpread2.default)({
389
389
  content: text,
390
390
  title: title,
391
- getContainer: getFullScreenElement(),
391
+ getContainer: getFullScreenElement() || document.body,
392
392
  onOk: function onOk() {
393
393
  resolve(true);
394
394
  },
@@ -428,7 +428,7 @@ var showConfirm = function showConfirm(text) {
428
428
  icon: /*#__PURE__*/_react.default.createElement(_icons.QuestionCircleOutlined, null),
429
429
  okType: 'danger',
430
430
  closable: true,
431
- getContainer: getFullScreenElement(),
431
+ getContainer: getFullScreenElement() || document.body,
432
432
  onOk: function onOk() {
433
433
  resolve(true);
434
434
  },
@@ -940,7 +940,8 @@ var showLoading = function showLoading() {
940
940
  tip: text
941
941
  }), loadWrapper);
942
942
 
943
- document.body.appendChild(loadWrapper);
943
+ var pNode = getFullScreenElement() || document.body;
944
+ pNode.appendChild(loadWrapper);
944
945
  };
945
946
 
946
947
  exports.showLoading = showLoading;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ls-pro-common",
3
- "version": "1.0.87",
3
+ "version": "1.0.88",
4
4
  "description": "ls-pro-common",
5
5
  "keywords": [
6
6
  "antd",