eoss-ui 0.5.69 → 0.5.70

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.
Files changed (61) hide show
  1. package/lib/button-group.js +34 -36
  2. package/lib/button.js +34 -36
  3. package/lib/checkbox-group.js +70 -56
  4. package/lib/data-table-form.js +37 -39
  5. package/lib/data-table.js +58 -58
  6. package/lib/date-picker.js +34 -36
  7. package/lib/dialog.js +49 -51
  8. package/lib/eoss-ui.common.js +660 -562
  9. package/lib/flow-group.js +34 -36
  10. package/lib/flow-list.js +36 -38
  11. package/lib/flow.js +40 -42
  12. package/lib/form.js +410 -376
  13. package/lib/handle-user.js +36 -38
  14. package/lib/handler.js +34 -36
  15. package/lib/index.js +1 -1
  16. package/lib/input-number.js +34 -36
  17. package/lib/input.js +65 -48
  18. package/lib/layout.js +2 -2
  19. package/lib/login.js +54 -55
  20. package/lib/main.js +39 -41
  21. package/lib/menu.js +4 -3
  22. package/lib/nav.js +34 -36
  23. package/lib/page.js +34 -36
  24. package/lib/player.js +34 -36
  25. package/lib/qr-code.js +34 -36
  26. package/lib/radio-group.js +69 -53
  27. package/lib/retrial-auth.js +34 -36
  28. package/lib/select-ganged.js +122 -106
  29. package/lib/select.js +112 -96
  30. package/lib/selector-panel.js +90 -76
  31. package/lib/selector.js +34 -36
  32. package/lib/sizer.js +36 -38
  33. package/lib/steps.js +60 -44
  34. package/lib/switch.js +34 -36
  35. package/lib/table-form.js +36 -38
  36. package/lib/tabs.js +34 -36
  37. package/lib/tips.js +59 -42
  38. package/lib/tree-group.js +34 -36
  39. package/lib/tree.js +93 -77
  40. package/lib/upload.js +111 -94
  41. package/lib/utils/util.js +34 -36
  42. package/lib/wujie.js +34 -36
  43. package/lib/wxlogin.js +34 -36
  44. package/package.json +2 -2
  45. package/packages/checkbox-group/src/main.vue +7 -1
  46. package/packages/data-table/src/main.vue +3 -1
  47. package/packages/dialog/src/main.vue +2 -3
  48. package/packages/form/src/main.vue +11 -2
  49. package/packages/input/src/main.vue +8 -1
  50. package/packages/login/src/main.vue +15 -11
  51. package/packages/menu/src/main.vue +2 -1
  52. package/packages/radio-group/src/main.vue +7 -1
  53. package/packages/select/src/main.vue +7 -1
  54. package/packages/select-ganged/src/main.vue +7 -1
  55. package/packages/selector-panel/src/main.vue +7 -1
  56. package/packages/steps/src/main.vue +9 -3
  57. package/packages/tips/src/main.vue +8 -1
  58. package/packages/tree/src/main.vue +8 -2
  59. package/packages/upload/src/main.vue +11 -2
  60. package/src/index.js +1 -1
  61. package/src/utils/util.js +34 -34
@@ -153,21 +153,17 @@ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ store
153
153
  * @param {Array} [encodes] - 需要对参数值进行encodeURIComponent编码的参数值名称
154
154
  **/
155
155
  // 请求
156
- var pendingRequest = new Map();
157
- function getRequestKey(config) {
158
- var method = config.method,
159
- url = config.url,
160
- params = config.params,
161
- data = config.data;
162
-
163
- return [method, url, qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(params), qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(data)].join('&');
164
- };
165
- function delPendingRequest(config) {
166
- var requestKey = getRequestKey(config);
167
- if (pendingRequest.has(requestKey)) {
168
- pendingRequest.delete(requestKey);
169
- }
170
- }
156
+ // const pendingRequest = new Map();
157
+ // function getRequestKey(config) {
158
+ // const { method, url, params, data } = config;
159
+ // return [method, url, qs.stringify(params), qs.stringify(data)].join('&');
160
+ // };
161
+ // function delPendingRequest(config) {
162
+ // let requestKey = getRequestKey(config);
163
+ // if (pendingRequest.has(requestKey)) {
164
+ // pendingRequest.delete(requestKey);
165
+ // }
166
+ // }
171
167
  var ajax = function ajax(_ref) {
172
168
  var headers = _ref.headers,
173
169
  method = _ref.method,
@@ -216,30 +212,32 @@ var ajax = function ajax(_ref) {
216
212
  http.interceptors.request.use(function (config) {
217
213
  config.headers.common = getStorage();
218
214
  // 根据请求的信息(请求方式,url,请求get/post数据),产生map的key
219
- var requestKey = getRequestKey(config);
220
- // 判断请求是否重复
221
- if (pendingRequest.has(requestKey)) {
222
- // 取消上次请求
223
- var cancel = pendingRequest.get(requestKey);
224
- cancel();
225
- // 删除请求信息
226
- pendingRequest.delete(requestKey);
227
- }
228
- // 把请求信息,添加请求到map当中
229
- // 生成取消方法
230
- config.cancelToken = config.cancelToken || new axios__WEBPACK_IMPORTED_MODULE_1___default.a.CancelToken(function (cancel) {
231
- // 把取消方法添加到map
232
- if (!pendingRequest.has(requestKey)) {
233
- pendingRequest.set(requestKey, cancel);
234
- }
235
- });
215
+ // let requestKey = getRequestKey(config);
216
+ // // 判断请求是否重复
217
+ // if (pendingRequest.has(requestKey)) {
218
+ // // 取消上次请求
219
+ // let cancel = pendingRequest.get(requestKey);
220
+ // cancel();
221
+ // // 删除请求信息
222
+ // pendingRequest.delete(requestKey);
223
+ // }
224
+ // // 把请求信息,添加请求到map当中
225
+ // // 生成取消方法
226
+ // config.cancelToken =
227
+ // config.cancelToken ||
228
+ // new axios.CancelToken(cancel => {
229
+ // // 把取消方法添加到map
230
+ // if (!pendingRequest.has(requestKey)) {
231
+ // pendingRequest.set(requestKey, cancel);
232
+ // }
233
+ // });
236
234
  return config;
237
235
  }, function (err) {
238
236
  return err;
239
237
  });
240
238
  // 响应拦截
241
239
  http.interceptors.response.use(function (response) {
242
- delPendingRequest(response.config);
240
+ // delPendingRequest(response.config);
243
241
  loading && loading.close();
244
242
  if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
245
243
  if (localStorage.getItem('storage') === 'localStorage' || localStorage.getItem('token') || localStorage.getItem('Authorization')) {
@@ -356,9 +354,9 @@ var ajax = function ajax(_ref) {
356
354
  }
357
355
  }, function (error) {
358
356
  loading && loading.close();
359
- if (!axios__WEBPACK_IMPORTED_MODULE_1___default.a.isCancel(error)) {
360
- delPendingRequest(error.config || {});
361
- }
357
+ // if (!axios.isCancel(error)) {
358
+ // delPendingRequest(error.config || {});
359
+ // }
362
360
  if (error && error.response) {
363
361
  if (error.response.status) {
364
362
  switch (error.response.status) {
@@ -3765,7 +3763,12 @@ module.exports = require("stompjs");
3765
3763
  module.exports = require("sm-crypto");
3766
3764
 
3767
3765
  /***/ }),
3768
- /* 11 */,
3766
+ /* 11 */
3767
+ /***/ (function(module, exports) {
3768
+
3769
+ module.exports = require("throttle-debounce");
3770
+
3771
+ /***/ }),
3769
3772
  /* 12 */,
3770
3773
  /* 13 */,
3771
3774
  /* 14 */,
@@ -3799,7 +3802,7 @@ module.exports = require("sortablejs");
3799
3802
  // ESM COMPAT FLAG
3800
3803
  __webpack_require__.r(__webpack_exports__);
3801
3804
 
3802
- // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector-panel/src/main.vue?vue&type=template&id=6d73abc3&
3805
+ // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector-panel/src/main.vue?vue&type=template&id=45642019&
3803
3806
  var render = function () {
3804
3807
  var _vm = this
3805
3808
  var _h = _vm.$createElement
@@ -4049,7 +4052,7 @@ var staticRenderFns = []
4049
4052
  render._withStripped = true
4050
4053
 
4051
4054
 
4052
- // CONCATENATED MODULE: ./packages/selector-panel/src/main.vue?vue&type=template&id=6d73abc3&
4055
+ // CONCATENATED MODULE: ./packages/selector-panel/src/main.vue?vue&type=template&id=45642019&
4053
4056
 
4054
4057
  // CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector-panel/src/tree.vue?vue&type=template&id=24ad732a&
4055
4058
  var treevue_type_template_id_24ad732a_render = function () {
@@ -4676,6 +4679,9 @@ var selection_component = Object(componentNormalizer["a" /* default */])(
4676
4679
  // EXTERNAL MODULE: ./src/config/api.js
4677
4680
  var api = __webpack_require__(1);
4678
4681
 
4682
+ // EXTERNAL MODULE: external "throttle-debounce"
4683
+ var external_throttle_debounce_ = __webpack_require__(11);
4684
+
4679
4685
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/selector-panel/src/main.vue?vue&type=script&lang=js&
4680
4686
  var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
4681
4687
 
@@ -4788,6 +4794,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
4788
4794
 
4789
4795
 
4790
4796
 
4797
+
4791
4798
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
4792
4799
  name: 'EsSelectorPanel',
4793
4800
  inheritAttrs: false,
@@ -5274,14 +5281,21 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5274
5281
  this.trees[this.activeName].value = val;
5275
5282
  }
5276
5283
  },
5284
+ beforeCreate: function beforeCreate() {
5285
+ var _this2 = this;
5286
+
5287
+ this.ajaxActive = Object(external_throttle_debounce_["debounce"])(300, function (active) {
5288
+ _this2.getAjaxActive(active);
5289
+ });
5290
+ },
5277
5291
  created: function created() {},
5278
5292
  mounted: function mounted() {
5279
5293
  this.ajaxActive(this.activeName);
5280
5294
  },
5281
5295
 
5282
5296
  methods: {
5283
- ajaxActive: function ajaxActive(active) {
5284
- var _this2 = this;
5297
+ getAjaxActive: function getAjaxActive(active) {
5298
+ var _this3 = this;
5285
5299
 
5286
5300
  if (this.isShowTree) {
5287
5301
  if ((!this.trees[active].data || this.trees[active].data && this.trees[active].data.length === 0) && this.newTabs[active].url) {
@@ -5307,12 +5321,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5307
5321
  data: this.param
5308
5322
  }).then(function (res) {
5309
5323
  if (res.rCode === 0) {
5310
- _this2.selections = JSON.parse(JSON.stringify(res.results));
5311
- _this2.checkboxs = JSON.parse(JSON.stringify(res.results)) || [];
5324
+ _this3.selections = JSON.parse(JSON.stringify(res.results));
5325
+ _this3.checkboxs = JSON.parse(JSON.stringify(res.results)) || [];
5312
5326
  }
5313
5327
  }).catch(function (err) {
5314
5328
  if (err.message && err.message !== 'canceled') {
5315
- _this2.$message.error(err.message);
5329
+ _this3.$message.error(err.message);
5316
5330
  }
5317
5331
  });
5318
5332
  } else {
@@ -5322,7 +5336,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5322
5336
  }
5323
5337
  },
5324
5338
  getTreeData: function getTreeData(url, params, id) {
5325
- var _this3 = this;
5339
+ var _this4 = this;
5326
5340
 
5327
5341
  var data = util["a" /* default */].extend({}, params, this.param);
5328
5342
  if (id !== undefined) {
@@ -5330,24 +5344,24 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5330
5344
  }
5331
5345
  util["a" /* default */].ajax({ method: this.method, url: url, params: data, data: data }).then(function (res) {
5332
5346
  if (res.rCode === 0) {
5333
- _this3.loading = false;
5347
+ _this4.loading = false;
5334
5348
  if (!Object.prototype.hasOwnProperty.call(params, 'seachkey')) {
5335
- _this3.$set(_this3.defaults[_this3.activeName], 'data', JSON.parse(JSON.stringify(res.results)));
5349
+ _this4.$set(_this4.defaults[_this4.activeName], 'data', JSON.parse(JSON.stringify(res.results)));
5336
5350
  }
5337
5351
  if (res.results.length && res.results[0].name === '无搜索数据') {
5338
- _this3.$set(_this3.trees[_this3.activeName], 'data', null);
5352
+ _this4.$set(_this4.trees[_this4.activeName], 'data', null);
5339
5353
  } else {
5340
- _this3.$set(_this3.trees[_this3.activeName], 'data', JSON.parse(JSON.stringify(res.results)));
5354
+ _this4.$set(_this4.trees[_this4.activeName], 'data', JSON.parse(JSON.stringify(res.results)));
5341
5355
  }
5342
5356
  }
5343
5357
  }).catch(function (err) {
5344
5358
  if (err.message && err.message !== 'canceled') {
5345
- _this3.$message.error(err.message);
5359
+ _this4.$message.error(err.message);
5346
5360
  }
5347
5361
  });
5348
5362
  },
5349
5363
  loadsub: function loadsub(data, node, flag) {
5350
- var _this4 = this;
5364
+ var _this5 = this;
5351
5365
 
5352
5366
  node;
5353
5367
  if (flag) {
@@ -5373,14 +5387,14 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5373
5387
  }).then(function (res) {
5374
5388
  if (res.rCode === 0) {
5375
5389
  data.selection = JSON.parse(JSON.stringify(res.results));
5376
- _this4.$set(_this4.trees[_this4.activeName], 'selection', JSON.parse(JSON.stringify(res.results)));
5377
- _this4.$set(_this4.trees[_this4.activeName], 'nodeData', data);
5378
- _this4.nodeData = _this4.trees[_this4.activeName].nodeData;
5379
- _this4.checkboxs = _this4.trees[_this4.activeName].selection;
5390
+ _this5.$set(_this5.trees[_this5.activeName], 'selection', JSON.parse(JSON.stringify(res.results)));
5391
+ _this5.$set(_this5.trees[_this5.activeName], 'nodeData', data);
5392
+ _this5.nodeData = _this5.trees[_this5.activeName].nodeData;
5393
+ _this5.checkboxs = _this5.trees[_this5.activeName].selection;
5380
5394
  }
5381
5395
  }).catch(function (err) {
5382
5396
  if (err.message && err.message !== 'canceled') {
5383
- _this4.$message.error(err.message);
5397
+ _this5.$message.error(err.message);
5384
5398
  }
5385
5399
  });
5386
5400
  } else {
@@ -5403,13 +5417,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5403
5417
  params: _params
5404
5418
  }).then(function (res) {
5405
5419
  if (res.rCode === 0) {
5406
- _this4.loading = false;
5407
- _this4.$set(data, 'children', JSON.parse(JSON.stringify(res.results)));
5408
- _this4.$set(_this4.defaults[_this4.activeName], 'data', JSON.parse(JSON.stringify(_this4.trees[_this4.activeName].data)));
5420
+ _this5.loading = false;
5421
+ _this5.$set(data, 'children', JSON.parse(JSON.stringify(res.results)));
5422
+ _this5.$set(_this5.defaults[_this5.activeName], 'data', JSON.parse(JSON.stringify(_this5.trees[_this5.activeName].data)));
5409
5423
  }
5410
5424
  }).catch(function (err) {
5411
5425
  if (err.message && err.message !== 'canceled') {
5412
- _this4.$message.error(err.message);
5426
+ _this5.$message.error(err.message);
5413
5427
  }
5414
5428
  });
5415
5429
  }
@@ -5427,7 +5441,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5427
5441
  }
5428
5442
  },
5429
5443
  handleCheckAll: function handleCheckAll(res) {
5430
- var _this5 = this;
5444
+ var _this6 = this;
5431
5445
 
5432
5446
  if (this.checkboxs.length > 0) {
5433
5447
  var isObject = util["a" /* default */].isObject(this.checkboxs[0]);
@@ -5445,9 +5459,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5445
5459
  if (this.isShowTree) {
5446
5460
  this.nodeData.checkAll = false;
5447
5461
  this.checkboxs.forEach(function (element) {
5448
- for (var i in _this5.checkeds) {
5449
- if (isObject && _this5.checkeds[i][_this5.valueKey] === element[_this5.valueKey] || _this5.checkeds[i] === element) {
5450
- _this5.checkeds.splice(i, 1);
5462
+ for (var i in _this6.checkeds) {
5463
+ if (isObject && _this6.checkeds[i][_this6.valueKey] === element[_this6.valueKey] || _this6.checkeds[i] === element) {
5464
+ _this6.checkeds.splice(i, 1);
5451
5465
  break;
5452
5466
  }
5453
5467
  }
@@ -5466,7 +5480,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5466
5480
  this.$emit('filtratechage', this.trees, this.activeName);
5467
5481
  },
5468
5482
  handleChangeSearch: function handleChangeSearch() {
5469
- var _this6 = this;
5483
+ var _this7 = this;
5470
5484
 
5471
5485
  if (this.search === '') {
5472
5486
  if (this.isShowTree) {
@@ -5480,11 +5494,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5480
5494
  var arry = [];
5481
5495
  this.nodeData.selection.forEach(function (item) {
5482
5496
  if (util["a" /* default */].isObject(item)) {
5483
- if (item[_this6.labelKey].indexOf(_this6.search) > -1) {
5497
+ if (item[_this7.labelKey].indexOf(_this7.search) > -1) {
5484
5498
  arry.push(item);
5485
5499
  }
5486
5500
  } else {
5487
- if (item.indexOf(_this6.search) > -1) {
5501
+ if (item.indexOf(_this7.search) > -1) {
5488
5502
  arry.push(item);
5489
5503
  }
5490
5504
  }
@@ -5495,11 +5509,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5495
5509
  var _arry = [];
5496
5510
  this.selections.forEach(function (item) {
5497
5511
  if (util["a" /* default */].isObject(item)) {
5498
- if (item[_this6.labelKey].indexOf(_this6.search) > -1) {
5512
+ if (item[_this7.labelKey].indexOf(_this7.search) > -1) {
5499
5513
  _arry.push(item);
5500
5514
  }
5501
5515
  } else {
5502
- if (item.indexOf(_this6.search) > -1) {
5516
+ if (item.indexOf(_this7.search) > -1) {
5503
5517
  _arry.push(item);
5504
5518
  }
5505
5519
  }
@@ -5509,7 +5523,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5509
5523
  }
5510
5524
  },
5511
5525
  handleSearch: function handleSearch() {
5512
- var _this7 = this;
5526
+ var _this8 = this;
5513
5527
 
5514
5528
  if (this.isShowTree) {
5515
5529
  if (this.nodeData && this.nodeData.selection) {
@@ -5517,11 +5531,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5517
5531
  var arry = [];
5518
5532
  this.nodeData.selection.forEach(function (item) {
5519
5533
  if (util["a" /* default */].isObject(item)) {
5520
- if (item[_this7.labelKey].indexOf(_this7.search) > -1) {
5534
+ if (item[_this8.labelKey].indexOf(_this8.search) > -1) {
5521
5535
  arry.push(item);
5522
5536
  }
5523
5537
  } else {
5524
- if (item.indexOf(_this7.search) > -1) {
5538
+ if (item.indexOf(_this8.search) > -1) {
5525
5539
  arry.push(item);
5526
5540
  }
5527
5541
  }
@@ -5543,11 +5557,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5543
5557
  }
5544
5558
  }).then(function (res) {
5545
5559
  if (res.rCode === 0) {
5546
- _this7.checkboxs = JSON.parse(JSON.stringify(res.results));
5560
+ _this8.checkboxs = JSON.parse(JSON.stringify(res.results));
5547
5561
  }
5548
5562
  }).catch(function (err) {
5549
5563
  if (err.message && err.message !== 'canceled') {
5550
- _this7.$message.error(err.message);
5564
+ _this8.$message.error(err.message);
5551
5565
  }
5552
5566
  });
5553
5567
  }
@@ -5556,11 +5570,11 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
5556
5570
  var _arry2 = [];
5557
5571
  this.selections.forEach(function (item) {
5558
5572
  if (util["a" /* default */].isObject(item)) {
5559
- if (item[_this7.labelKey].indexOf(_this7.search) > -1) {
5573
+ if (item[_this8.labelKey].indexOf(_this8.search) > -1) {
5560
5574
  _arry2.push(item);
5561
5575
  }
5562
5576
  } else {
5563
- if (item.indexOf(_this7.search) > -1) {
5577
+ if (item.indexOf(_this8.search) > -1) {
5564
5578
  _arry2.push(item);
5565
5579
  }
5566
5580
  }
package/lib/selector.js CHANGED
@@ -154,21 +154,17 @@ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ store
154
154
  * @param {Array} [encodes] - 需要对参数值进行encodeURIComponent编码的参数值名称
155
155
  **/
156
156
  // 请求
157
- var pendingRequest = new Map();
158
- function getRequestKey(config) {
159
- var method = config.method,
160
- url = config.url,
161
- params = config.params,
162
- data = config.data;
163
-
164
- return [method, url, qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(params), qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(data)].join('&');
165
- };
166
- function delPendingRequest(config) {
167
- var requestKey = getRequestKey(config);
168
- if (pendingRequest.has(requestKey)) {
169
- pendingRequest.delete(requestKey);
170
- }
171
- }
157
+ // const pendingRequest = new Map();
158
+ // function getRequestKey(config) {
159
+ // const { method, url, params, data } = config;
160
+ // return [method, url, qs.stringify(params), qs.stringify(data)].join('&');
161
+ // };
162
+ // function delPendingRequest(config) {
163
+ // let requestKey = getRequestKey(config);
164
+ // if (pendingRequest.has(requestKey)) {
165
+ // pendingRequest.delete(requestKey);
166
+ // }
167
+ // }
172
168
  var ajax = function ajax(_ref) {
173
169
  var headers = _ref.headers,
174
170
  method = _ref.method,
@@ -217,30 +213,32 @@ var ajax = function ajax(_ref) {
217
213
  http.interceptors.request.use(function (config) {
218
214
  config.headers.common = getStorage();
219
215
  // 根据请求的信息(请求方式,url,请求get/post数据),产生map的key
220
- var requestKey = getRequestKey(config);
221
- // 判断请求是否重复
222
- if (pendingRequest.has(requestKey)) {
223
- // 取消上次请求
224
- var cancel = pendingRequest.get(requestKey);
225
- cancel();
226
- // 删除请求信息
227
- pendingRequest.delete(requestKey);
228
- }
229
- // 把请求信息,添加请求到map当中
230
- // 生成取消方法
231
- config.cancelToken = config.cancelToken || new axios__WEBPACK_IMPORTED_MODULE_1___default.a.CancelToken(function (cancel) {
232
- // 把取消方法添加到map
233
- if (!pendingRequest.has(requestKey)) {
234
- pendingRequest.set(requestKey, cancel);
235
- }
236
- });
216
+ // let requestKey = getRequestKey(config);
217
+ // // 判断请求是否重复
218
+ // if (pendingRequest.has(requestKey)) {
219
+ // // 取消上次请求
220
+ // let cancel = pendingRequest.get(requestKey);
221
+ // cancel();
222
+ // // 删除请求信息
223
+ // pendingRequest.delete(requestKey);
224
+ // }
225
+ // // 把请求信息,添加请求到map当中
226
+ // // 生成取消方法
227
+ // config.cancelToken =
228
+ // config.cancelToken ||
229
+ // new axios.CancelToken(cancel => {
230
+ // // 把取消方法添加到map
231
+ // if (!pendingRequest.has(requestKey)) {
232
+ // pendingRequest.set(requestKey, cancel);
233
+ // }
234
+ // });
237
235
  return config;
238
236
  }, function (err) {
239
237
  return err;
240
238
  });
241
239
  // 响应拦截
242
240
  http.interceptors.response.use(function (response) {
243
- delPendingRequest(response.config);
241
+ // delPendingRequest(response.config);
244
242
  loading && loading.close();
245
243
  if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
246
244
  if (localStorage.getItem('storage') === 'localStorage' || localStorage.getItem('token') || localStorage.getItem('Authorization')) {
@@ -357,9 +355,9 @@ var ajax = function ajax(_ref) {
357
355
  }
358
356
  }, function (error) {
359
357
  loading && loading.close();
360
- if (!axios__WEBPACK_IMPORTED_MODULE_1___default.a.isCancel(error)) {
361
- delPendingRequest(error.config || {});
362
- }
358
+ // if (!axios.isCancel(error)) {
359
+ // delPendingRequest(error.config || {});
360
+ // }
363
361
  if (error && error.response) {
364
362
  if (error.response.status) {
365
363
  switch (error.response.status) {
package/lib/sizer.js CHANGED
@@ -154,21 +154,17 @@ var JSONbigToString = json_bigint__WEBPACK_IMPORTED_MODULE_3___default()({ store
154
154
  * @param {Array} [encodes] - 需要对参数值进行encodeURIComponent编码的参数值名称
155
155
  **/
156
156
  // 请求
157
- var pendingRequest = new Map();
158
- function getRequestKey(config) {
159
- var method = config.method,
160
- url = config.url,
161
- params = config.params,
162
- data = config.data;
163
-
164
- return [method, url, qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(params), qs__WEBPACK_IMPORTED_MODULE_2___default.a.stringify(data)].join('&');
165
- };
166
- function delPendingRequest(config) {
167
- var requestKey = getRequestKey(config);
168
- if (pendingRequest.has(requestKey)) {
169
- pendingRequest.delete(requestKey);
170
- }
171
- }
157
+ // const pendingRequest = new Map();
158
+ // function getRequestKey(config) {
159
+ // const { method, url, params, data } = config;
160
+ // return [method, url, qs.stringify(params), qs.stringify(data)].join('&');
161
+ // };
162
+ // function delPendingRequest(config) {
163
+ // let requestKey = getRequestKey(config);
164
+ // if (pendingRequest.has(requestKey)) {
165
+ // pendingRequest.delete(requestKey);
166
+ // }
167
+ // }
172
168
  var ajax = function ajax(_ref) {
173
169
  var headers = _ref.headers,
174
170
  method = _ref.method,
@@ -217,30 +213,32 @@ var ajax = function ajax(_ref) {
217
213
  http.interceptors.request.use(function (config) {
218
214
  config.headers.common = getStorage();
219
215
  // 根据请求的信息(请求方式,url,请求get/post数据),产生map的key
220
- var requestKey = getRequestKey(config);
221
- // 判断请求是否重复
222
- if (pendingRequest.has(requestKey)) {
223
- // 取消上次请求
224
- var cancel = pendingRequest.get(requestKey);
225
- cancel();
226
- // 删除请求信息
227
- pendingRequest.delete(requestKey);
228
- }
229
- // 把请求信息,添加请求到map当中
230
- // 生成取消方法
231
- config.cancelToken = config.cancelToken || new axios__WEBPACK_IMPORTED_MODULE_1___default.a.CancelToken(function (cancel) {
232
- // 把取消方法添加到map
233
- if (!pendingRequest.has(requestKey)) {
234
- pendingRequest.set(requestKey, cancel);
235
- }
236
- });
216
+ // let requestKey = getRequestKey(config);
217
+ // // 判断请求是否重复
218
+ // if (pendingRequest.has(requestKey)) {
219
+ // // 取消上次请求
220
+ // let cancel = pendingRequest.get(requestKey);
221
+ // cancel();
222
+ // // 删除请求信息
223
+ // pendingRequest.delete(requestKey);
224
+ // }
225
+ // // 把请求信息,添加请求到map当中
226
+ // // 生成取消方法
227
+ // config.cancelToken =
228
+ // config.cancelToken ||
229
+ // new axios.CancelToken(cancel => {
230
+ // // 把取消方法添加到map
231
+ // if (!pendingRequest.has(requestKey)) {
232
+ // pendingRequest.set(requestKey, cancel);
233
+ // }
234
+ // });
237
235
  return config;
238
236
  }, function (err) {
239
237
  return err;
240
238
  });
241
239
  // 响应拦截
242
240
  http.interceptors.response.use(function (response) {
243
- delPendingRequest(response.config);
241
+ // delPendingRequest(response.config);
244
242
  loading && loading.close();
245
243
  if (response.headers.authorization && response.headers.authorization !== getStorage('token')) {
246
244
  if (localStorage.getItem('storage') === 'localStorage' || localStorage.getItem('token') || localStorage.getItem('Authorization')) {
@@ -357,9 +355,9 @@ var ajax = function ajax(_ref) {
357
355
  }
358
356
  }, function (error) {
359
357
  loading && loading.close();
360
- if (!axios__WEBPACK_IMPORTED_MODULE_1___default.a.isCancel(error)) {
361
- delPendingRequest(error.config || {});
362
- }
358
+ // if (!axios.isCancel(error)) {
359
+ // delPendingRequest(error.config || {});
360
+ // }
363
361
  if (error && error.response) {
364
362
  if (error.response.status) {
365
363
  switch (error.response.status) {
@@ -3497,7 +3495,7 @@ module.exports = require("sm-crypto");
3497
3495
 
3498
3496
  /***/ }),
3499
3497
 
3500
- /***/ 12:
3498
+ /***/ 13:
3501
3499
  /***/ (function(module, exports) {
3502
3500
 
3503
3501
  module.exports = require("babel-runtime/regenerator");
@@ -3753,7 +3751,7 @@ render._withStripped = true
3753
3751
  // CONCATENATED MODULE: ./packages/sizer/src/main.vue?vue&type=template&id=14ef78da&
3754
3752
 
3755
3753
  // EXTERNAL MODULE: external "babel-runtime/regenerator"
3756
- var regenerator_ = __webpack_require__(12);
3754
+ var regenerator_ = __webpack_require__(13);
3757
3755
  var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator_);
3758
3756
 
3759
3757
  // EXTERNAL MODULE: ./src/config/api.js