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/handle-user.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) {
|
|
@@ -3497,7 +3495,7 @@ module.exports = require("sm-crypto");
|
|
|
3497
3495
|
|
|
3498
3496
|
/***/ }),
|
|
3499
3497
|
|
|
3500
|
-
/***/
|
|
3498
|
+
/***/ 12:
|
|
3501
3499
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
3502
3500
|
|
|
3503
3501
|
"use strict";
|
|
@@ -3745,7 +3743,7 @@ render._withStripped = true
|
|
|
3745
3743
|
var api = __webpack_require__(1);
|
|
3746
3744
|
|
|
3747
3745
|
// EXTERNAL MODULE: ./src/utils/store.js
|
|
3748
|
-
var store = __webpack_require__(
|
|
3746
|
+
var store = __webpack_require__(12);
|
|
3749
3747
|
|
|
3750
3748
|
// EXTERNAL MODULE: ./src/utils/util.js
|
|
3751
3749
|
var util = __webpack_require__(0);
|
package/lib/handler.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) {
|