eoss-ui 0.5.68 → 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 (96) hide show
  1. package/CHANGELOG.md +929 -0
  2. package/lib/button-group.js +34 -36
  3. package/lib/button.js +34 -36
  4. package/lib/checkbox-group.js +70 -56
  5. package/lib/data-table-form.js +37 -39
  6. package/lib/data-table.js +73 -64
  7. package/lib/date-picker.js +34 -36
  8. package/lib/dialog.js +49 -51
  9. package/lib/eoss-ui.common.js +944 -728
  10. package/lib/flow-group.js +34 -36
  11. package/lib/flow-list.js +36 -38
  12. package/lib/flow.js +40 -42
  13. package/lib/form.js +410 -376
  14. package/lib/handle-user.js +36 -38
  15. package/lib/handler.js +34 -36
  16. package/lib/icon.js +12 -3593
  17. package/lib/icons.js +1 -1
  18. package/lib/index.js +1 -1
  19. package/lib/input-number.js +34 -36
  20. package/lib/input.js +65 -48
  21. package/lib/layout.js +2 -2
  22. package/lib/login.js +131 -114
  23. package/lib/main.js +80 -50
  24. package/lib/menu.js +91 -55
  25. package/lib/nav.js +66 -41
  26. package/lib/page.js +34 -36
  27. package/lib/player.js +36 -38
  28. package/lib/qr-code.js +34 -36
  29. package/lib/radio-group.js +69 -53
  30. package/lib/retrial-auth.js +34 -36
  31. package/lib/select-ganged.js +122 -106
  32. package/lib/select.js +112 -96
  33. package/lib/selector-panel.js +90 -76
  34. package/lib/selector.js +34 -36
  35. package/lib/sizer.js +36 -38
  36. package/lib/steps.js +60 -44
  37. package/lib/switch.js +34 -36
  38. package/lib/table-form.js +36 -38
  39. package/lib/tabs.js +34 -36
  40. package/lib/theme-chalk/base.css +1 -1
  41. package/lib/theme-chalk/fonts/iconfont.ttf +0 -0
  42. package/lib/theme-chalk/fonts/iconfont.woff +0 -0
  43. package/lib/theme-chalk/icon.css +1 -1
  44. package/lib/theme-chalk/index.css +1 -1
  45. package/lib/theme-chalk/login.css +1 -1
  46. package/lib/theme-chalk/main.css +1 -1
  47. package/lib/theme-chalk/menu.css +1 -1
  48. package/lib/theme-chalk/sizer.css +1 -1
  49. package/lib/theme-chalk/upload.css +1 -1
  50. package/lib/tips.js +59 -42
  51. package/lib/tree-group.js +34 -36
  52. package/lib/tree.js +93 -77
  53. package/lib/upload.js +111 -94
  54. package/lib/utils/util.js +34 -36
  55. package/lib/wujie.js +34 -36
  56. package/lib/wxlogin.js +34 -36
  57. package/package.json +2 -2
  58. package/packages/checkbox-group/src/main.vue +7 -1
  59. package/packages/data-table/src/main.vue +13 -6
  60. package/packages/dialog/src/main.vue +2 -3
  61. package/packages/form/src/main.vue +11 -2
  62. package/packages/icon/src/main.vue +10 -3
  63. package/packages/icons/src/icon.json +1 -1
  64. package/packages/input/src/main.vue +8 -1
  65. package/packages/login/src/main.vue +36 -24
  66. package/packages/main/src/main.vue +28 -6
  67. package/packages/menu/src/main.vue +76 -65
  68. package/packages/nav/src/main.vue +23 -4
  69. package/packages/radio-group/src/main.vue +7 -1
  70. package/packages/select/src/main.vue +7 -1
  71. package/packages/select-ganged/src/main.vue +7 -1
  72. package/packages/selector-panel/src/main.vue +7 -1
  73. package/packages/steps/src/main.vue +9 -3
  74. package/packages/theme-chalk/lib/base.css +1 -1
  75. package/packages/theme-chalk/lib/fonts/iconfont.ttf +0 -0
  76. package/packages/theme-chalk/lib/fonts/iconfont.woff +0 -0
  77. package/packages/theme-chalk/lib/icon.css +1 -1
  78. package/packages/theme-chalk/lib/index.css +1 -1
  79. package/packages/theme-chalk/lib/login.css +1 -1
  80. package/packages/theme-chalk/lib/main.css +1 -1
  81. package/packages/theme-chalk/lib/menu.css +1 -1
  82. package/packages/theme-chalk/lib/sizer.css +1 -1
  83. package/packages/theme-chalk/lib/upload.css +1 -1
  84. package/packages/theme-chalk/src/common/var.scss +2 -0
  85. package/packages/theme-chalk/src/fonts/iconfont.ttf +0 -0
  86. package/packages/theme-chalk/src/fonts/iconfont.woff +0 -0
  87. package/packages/theme-chalk/src/icon.scss +430 -426
  88. package/packages/theme-chalk/src/login.scss +2 -3
  89. package/packages/theme-chalk/src/main.scss +14 -5
  90. package/packages/theme-chalk/src/menu.scss +1 -1
  91. package/packages/theme-chalk/src/nav.scss +2 -2
  92. package/packages/tips/src/main.vue +8 -1
  93. package/packages/tree/src/main.vue +8 -2
  94. package/packages/upload/src/main.vue +11 -2
  95. package/src/index.js +1 -1
  96. package/src/utils/util.js +34 -34
@@ -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/input.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,14 @@ module.exports = require("sm-crypto");
3497
3495
 
3498
3496
  /***/ }),
3499
3497
 
3500
- /***/ 13:
3498
+ /***/ 11:
3499
+ /***/ (function(module, exports) {
3500
+
3501
+ module.exports = require("throttle-debounce");
3502
+
3503
+ /***/ }),
3504
+
3505
+ /***/ 14:
3501
3506
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
3502
3507
 
3503
3508
  "use strict";
@@ -3795,11 +3800,14 @@ var WebSocket = function () {
3795
3800
  // ESM COMPAT FLAG
3796
3801
  __webpack_require__.r(__webpack_exports__);
3797
3802
 
3803
+ // EXTERNAL MODULE: external "throttle-debounce"
3804
+ var external_throttle_debounce_ = __webpack_require__(11);
3805
+
3798
3806
  // EXTERNAL MODULE: ./src/utils/util.js
3799
3807
  var util = __webpack_require__(0);
3800
3808
 
3801
3809
  // EXTERNAL MODULE: ./src/utils/rules.js
3802
- var rules = __webpack_require__(13);
3810
+ var rules = __webpack_require__(14);
3803
3811
 
3804
3812
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/input/src/main.vue?vue&type=script&lang=js&
3805
3813
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
@@ -3808,6 +3816,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3808
3816
 
3809
3817
 
3810
3818
 
3819
+
3811
3820
  /* harmony default export */ var mainvue_type_script_lang_js_ = ({
3812
3821
  name: 'EsInput',
3813
3822
  componentName: 'EsInput',
@@ -3926,11 +3935,19 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3926
3935
  return undefined;
3927
3936
  }
3928
3937
  },
3938
+ beforeCreate: function beforeCreate() {
3939
+ var _this2 = this;
3940
+
3941
+ this.getData = Object(external_throttle_debounce_["debounce"])(300, function (query, callback, isChange) {
3942
+ _this2.getDatas(query, callback, isChange);
3943
+ });
3944
+ },
3945
+ created: function created() {},
3929
3946
  mounted: function mounted() {},
3930
3947
 
3931
3948
  methods: {
3932
- getData: function getData(query, callback, isChange) {
3933
- var _this2 = this;
3949
+ getDatas: function getDatas(query, callback, isChange) {
3950
+ var _this3 = this;
3934
3951
 
3935
3952
  if (_typeof(this.url) && this.results.length === 0) {
3936
3953
  util["a" /* default */].ajax({
@@ -3940,13 +3957,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3940
3957
  params: this.param
3941
3958
  }).then(function (res) {
3942
3959
  if (res.rCode === 0) {
3943
- _this2.results = JSON.parse(JSON.stringify(res.results));
3944
- var results = query ? _this2.results.filter(_this2.searchFilter(query)) : _this2.results;
3960
+ _this3.results = JSON.parse(JSON.stringify(res.results));
3961
+ var results = query ? _this3.results.filter(_this3.searchFilter(query)) : _this3.results;
3945
3962
  callback(results);
3946
3963
  }
3947
3964
  }).catch(function (err) {
3948
3965
  if (err.message && err.message !== 'canceled') {
3949
- _this2.$message.error(err.message);
3966
+ _this3.$message.error(err.message);
3950
3967
  }
3951
3968
  });
3952
3969
  } else {
@@ -3955,13 +3972,13 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3955
3972
  }
3956
3973
  },
3957
3974
  searchFilter: function searchFilter(query, isChange) {
3958
- var _this3 = this;
3975
+ var _this4 = this;
3959
3976
 
3960
3977
  return function (state) {
3961
3978
  if (isChange) {
3962
3979
  return state.value.indexOf(query) > -1;
3963
3980
  } else {
3964
- if (_this3.exclude) {
3981
+ if (_this4.exclude) {
3965
3982
  return state.value !== query;
3966
3983
  } else {
3967
3984
  return state.value === query;
@@ -3970,7 +3987,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3970
3987
  };
3971
3988
  },
3972
3989
  renderd: function renderd(doms, h, type) {
3973
- var _this4 = this;
3990
+ var _this5 = this;
3974
3991
 
3975
3992
  if (typeof this.$attrs[type] === 'boolean') {
3976
3993
  if (this.$attrs.render) {
@@ -3996,8 +4013,8 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
3996
4013
  domProps: this.$attrs[type].icon ? { innerHTML: this.$attrs[type].icon } : {},
3997
4014
  on: {
3998
4015
  click: function click() {
3999
- _this4.$attrs[type].click && _this4.$attrs[type].click(_this4, _this4.model, _this4.scope);
4000
- _this4.$attrs[type].event && _this4.$attrs[type].event(_this4, _this4.model, _this4.scope);
4016
+ _this5.$attrs[type].click && _this5.$attrs[type].click(_this5, _this5.model, _this5.scope);
4017
+ _this5.$attrs[type].event && _this5.$attrs[type].event(_this5, _this5.model, _this5.scope);
4001
4018
  }
4002
4019
  }
4003
4020
  }, [this.$attrs[type].text]));
package/lib/layout.js CHANGED
@@ -87,7 +87,7 @@ module.exports =
87
87
  /************************************************************************/
88
88
  /******/ ({
89
89
 
90
- /***/ 16:
90
+ /***/ 17:
91
91
  /***/ (function(module, exports) {
92
92
 
93
93
  module.exports = require("interactjs");
@@ -267,7 +267,7 @@ itemvue_type_template_id_124bb300_render._withStripped = true
267
267
  // CONCATENATED MODULE: ./packages/layout/src/item.vue?vue&type=template&id=124bb300&
268
268
 
269
269
  // EXTERNAL MODULE: external "interactjs"
270
- var external_interactjs_ = __webpack_require__(16);
270
+ var external_interactjs_ = __webpack_require__(17);
271
271
  var external_interactjs_default = /*#__PURE__*/__webpack_require__.n(external_interactjs_);
272
272
 
273
273
  // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/layout/src/item.vue?vue&type=script&lang=js&