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.
- package/lib/button-group.js +34 -36
- package/lib/button.js +34 -36
- package/lib/checkbox-group.js +70 -56
- package/lib/data-table-form.js +37 -39
- package/lib/data-table.js +58 -58
- package/lib/date-picker.js +34 -36
- package/lib/dialog.js +49 -51
- package/lib/eoss-ui.common.js +660 -562
- package/lib/flow-group.js +34 -36
- package/lib/flow-list.js +36 -38
- package/lib/flow.js +40 -42
- package/lib/form.js +410 -376
- package/lib/handle-user.js +36 -38
- package/lib/handler.js +34 -36
- package/lib/index.js +1 -1
- package/lib/input-number.js +34 -36
- package/lib/input.js +65 -48
- package/lib/layout.js +2 -2
- package/lib/login.js +54 -55
- package/lib/main.js +39 -41
- package/lib/menu.js +4 -3
- package/lib/nav.js +34 -36
- package/lib/page.js +34 -36
- package/lib/player.js +34 -36
- package/lib/qr-code.js +34 -36
- package/lib/radio-group.js +69 -53
- package/lib/retrial-auth.js +34 -36
- package/lib/select-ganged.js +122 -106
- package/lib/select.js +112 -96
- package/lib/selector-panel.js +90 -76
- package/lib/selector.js +34 -36
- package/lib/sizer.js +36 -38
- package/lib/steps.js +60 -44
- package/lib/switch.js +34 -36
- package/lib/table-form.js +36 -38
- package/lib/tabs.js +34 -36
- package/lib/tips.js +59 -42
- package/lib/tree-group.js +34 -36
- package/lib/tree.js +93 -77
- package/lib/upload.js +111 -94
- package/lib/utils/util.js +34 -36
- package/lib/wujie.js +34 -36
- package/lib/wxlogin.js +34 -36
- package/package.json +2 -2
- package/packages/checkbox-group/src/main.vue +7 -1
- package/packages/data-table/src/main.vue +3 -1
- package/packages/dialog/src/main.vue +2 -3
- package/packages/form/src/main.vue +11 -2
- package/packages/input/src/main.vue +8 -1
- package/packages/login/src/main.vue +15 -11
- package/packages/menu/src/main.vue +2 -1
- package/packages/radio-group/src/main.vue +7 -1
- package/packages/select/src/main.vue +7 -1
- package/packages/select-ganged/src/main.vue +7 -1
- package/packages/selector-panel/src/main.vue +7 -1
- package/packages/steps/src/main.vue +9 -3
- package/packages/tips/src/main.vue +8 -1
- package/packages/tree/src/main.vue +8 -2
- package/packages/upload/src/main.vue +11 -2
- package/src/index.js +1 -1
- package/src/utils/util.js +34 -34
package/lib/radio-group.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
|
-
|
|
158
|
-
function getRequestKey(config) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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
|
-
|
|
221
|
-
// 判断请求是否重复
|
|
222
|
-
if (pendingRequest.has(requestKey)) {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
// 把请求信息,添加请求到map当中
|
|
230
|
-
// 生成取消方法
|
|
231
|
-
config.cancelToken =
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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 (!
|
|
361
|
-
|
|
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) {
|
|
@@ -3498,6 +3496,13 @@ module.exports = require("sm-crypto");
|
|
|
3498
3496
|
/***/ }),
|
|
3499
3497
|
|
|
3500
3498
|
/***/ 11:
|
|
3499
|
+
/***/ (function(module, exports) {
|
|
3500
|
+
|
|
3501
|
+
module.exports = require("throttle-debounce");
|
|
3502
|
+
|
|
3503
|
+
/***/ }),
|
|
3504
|
+
|
|
3505
|
+
/***/ 12:
|
|
3501
3506
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3502
3507
|
|
|
3503
3508
|
"use strict";
|
|
@@ -3525,11 +3530,11 @@ window.__store = store;
|
|
|
3525
3530
|
|
|
3526
3531
|
/***/ }),
|
|
3527
3532
|
|
|
3528
|
-
/***/
|
|
3533
|
+
/***/ 15:
|
|
3529
3534
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3530
3535
|
|
|
3531
3536
|
"use strict";
|
|
3532
|
-
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3537
|
+
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16);
|
|
3533
3538
|
/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__);
|
|
3534
3539
|
|
|
3535
3540
|
|
|
@@ -3537,7 +3542,7 @@ window.__store = store;
|
|
|
3537
3542
|
|
|
3538
3543
|
/***/ }),
|
|
3539
3544
|
|
|
3540
|
-
/***/
|
|
3545
|
+
/***/ 16:
|
|
3541
3546
|
/***/ (function(module, exports) {
|
|
3542
3547
|
|
|
3543
3548
|
module.exports = require("vue");
|
|
@@ -3677,7 +3682,7 @@ module.exports = require("axios");
|
|
|
3677
3682
|
// ESM COMPAT FLAG
|
|
3678
3683
|
__webpack_require__.r(__webpack_exports__);
|
|
3679
3684
|
|
|
3680
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio-group/src/main.vue?vue&type=template&id=
|
|
3685
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio-group/src/main.vue?vue&type=template&id=91fe7d0a&
|
|
3681
3686
|
var render = function () {
|
|
3682
3687
|
var _vm = this
|
|
3683
3688
|
var _h = _vm.$createElement
|
|
@@ -3811,19 +3816,22 @@ var staticRenderFns = []
|
|
|
3811
3816
|
render._withStripped = true
|
|
3812
3817
|
|
|
3813
3818
|
|
|
3814
|
-
// CONCATENATED MODULE: ./packages/radio-group/src/main.vue?vue&type=template&id=
|
|
3819
|
+
// CONCATENATED MODULE: ./packages/radio-group/src/main.vue?vue&type=template&id=91fe7d0a&
|
|
3815
3820
|
|
|
3816
3821
|
// EXTERNAL MODULE: ./src/config/api.js
|
|
3817
3822
|
var api = __webpack_require__(1);
|
|
3818
3823
|
|
|
3824
|
+
// EXTERNAL MODULE: external "throttle-debounce"
|
|
3825
|
+
var external_throttle_debounce_ = __webpack_require__(11);
|
|
3826
|
+
|
|
3819
3827
|
// EXTERNAL MODULE: ./src/utils/store.js
|
|
3820
|
-
var store = __webpack_require__(
|
|
3828
|
+
var store = __webpack_require__(12);
|
|
3821
3829
|
|
|
3822
3830
|
// EXTERNAL MODULE: ./src/utils/util.js
|
|
3823
3831
|
var util = __webpack_require__(0);
|
|
3824
3832
|
|
|
3825
3833
|
// EXTERNAL MODULE: ./src/utils/bus.js
|
|
3826
|
-
var bus = __webpack_require__(
|
|
3834
|
+
var bus = __webpack_require__(15);
|
|
3827
3835
|
|
|
3828
3836
|
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/radio-group/src/main.vue?vue&type=script&lang=js&
|
|
3829
3837
|
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; };
|
|
@@ -3891,6 +3899,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
3891
3899
|
|
|
3892
3900
|
|
|
3893
3901
|
|
|
3902
|
+
|
|
3894
3903
|
/* harmony default export */ var mainvue_type_script_lang_js_ = ({
|
|
3895
3904
|
name: 'EsRadioGroup',
|
|
3896
3905
|
inheritAttrs: false,
|
|
@@ -4064,14 +4073,21 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4064
4073
|
}
|
|
4065
4074
|
}
|
|
4066
4075
|
},
|
|
4076
|
+
beforeCreate: function beforeCreate() {
|
|
4077
|
+
var _this2 = this;
|
|
4078
|
+
|
|
4079
|
+
this.getData = Object(external_throttle_debounce_["debounce"])(300, function (url, sysCode) {
|
|
4080
|
+
_this2.getDatas(url, sysCode);
|
|
4081
|
+
});
|
|
4082
|
+
},
|
|
4067
4083
|
created: function created() {
|
|
4068
4084
|
this.bindEventBus();
|
|
4069
4085
|
},
|
|
4070
4086
|
mounted: function mounted() {},
|
|
4071
4087
|
|
|
4072
4088
|
methods: {
|
|
4073
|
-
|
|
4074
|
-
var
|
|
4089
|
+
getDatas: function getDatas(url, sysCode) {
|
|
4090
|
+
var _this3 = this;
|
|
4075
4091
|
|
|
4076
4092
|
var params = {};
|
|
4077
4093
|
if (this.results.length === 0) {
|
|
@@ -4089,23 +4105,23 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
4089
4105
|
params: params,
|
|
4090
4106
|
data: params
|
|
4091
4107
|
}).then(function (res) {
|
|
4092
|
-
|
|
4093
|
-
|
|
4108
|
+
_this3.loading = false;
|
|
4109
|
+
_this3.canceled = false;
|
|
4094
4110
|
if (res.rCode === 0) {
|
|
4095
|
-
|
|
4096
|
-
if (sysCode ||
|
|
4097
|
-
bus["a" /* default */].$emit(sysCode ||
|
|
4111
|
+
_this3.options = JSON.parse(JSON.stringify(res.results));
|
|
4112
|
+
if (sysCode || _this3.dataKey) {
|
|
4113
|
+
bus["a" /* default */].$emit(sysCode || _this3.dataKey, JSON.parse(JSON.stringify(_this3.options)));
|
|
4098
4114
|
store["a" /* default */].set(sysCode, JSON.parse(JSON.stringify(res.results)));
|
|
4099
4115
|
}
|
|
4100
4116
|
}
|
|
4101
4117
|
}).catch(function (err) {
|
|
4102
|
-
|
|
4118
|
+
_this3.loading = false;
|
|
4103
4119
|
if (err.message) {
|
|
4104
4120
|
if (err.message !== 'canceled') {
|
|
4105
|
-
|
|
4121
|
+
_this3.$message.error(err.message);
|
|
4106
4122
|
}
|
|
4107
4123
|
if (err.message === 'canceled' && sysCode) {
|
|
4108
|
-
|
|
4124
|
+
_this3.canceled = true;
|
|
4109
4125
|
}
|
|
4110
4126
|
}
|
|
4111
4127
|
});
|
package/lib/retrial-auth.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
|
-
|
|
158
|
-
function getRequestKey(config) {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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
|
-
|
|
221
|
-
// 判断请求是否重复
|
|
222
|
-
if (pendingRequest.has(requestKey)) {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
// 把请求信息,添加请求到map当中
|
|
230
|
-
// 生成取消方法
|
|
231
|
-
config.cancelToken =
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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 (!
|
|
361
|
-
|
|
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) {
|