@blueking/bkui-form 0.0.49 → 0.0.50
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/dist/bkui-form-es-min.js +5 -3
- package/dist/bkui-form-es.js +175 -369
- package/dist/bkui-form-es.js.map +1 -1
- package/dist/bkui-form-umd-min.js +5 -3
- package/dist/bkui-form-umd.js +175 -369
- package/dist/bkui-form-umd.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +3 -2
package/dist/bkui-form-umd.js
CHANGED
|
@@ -203,306 +203,113 @@
|
|
|
203
203
|
}
|
|
204
204
|
return t;
|
|
205
205
|
}
|
|
206
|
-
function
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
206
|
+
function _regenerator() {
|
|
207
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
208
|
+
var e,
|
|
209
|
+
t,
|
|
210
|
+
r = "function" == typeof Symbol ? Symbol : {},
|
|
211
|
+
n = r.iterator || "@@iterator",
|
|
212
|
+
o = r.toStringTag || "@@toStringTag";
|
|
213
|
+
function i(r, n, o, i) {
|
|
214
|
+
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
215
|
+
u = Object.create(c.prototype);
|
|
216
|
+
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
217
|
+
var i,
|
|
218
|
+
c,
|
|
219
|
+
u,
|
|
220
|
+
f = 0,
|
|
221
|
+
p = o || [],
|
|
222
|
+
y = !1,
|
|
223
|
+
G = {
|
|
224
|
+
p: 0,
|
|
225
|
+
n: 0,
|
|
226
|
+
v: e,
|
|
227
|
+
a: d,
|
|
228
|
+
f: d.bind(e, 4),
|
|
229
|
+
d: function (t, r) {
|
|
230
|
+
return i = t, c = 0, u = e, G.n = r, a;
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
function d(r, n) {
|
|
234
|
+
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
235
|
+
var o,
|
|
236
|
+
i = p[t],
|
|
237
|
+
d = G.p,
|
|
238
|
+
l = i[2];
|
|
239
|
+
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
|
|
240
|
+
}
|
|
241
|
+
if (o || r > 1) return a;
|
|
242
|
+
throw y = !0, n;
|
|
243
|
+
}
|
|
244
|
+
return function (o, p, l) {
|
|
245
|
+
if (f > 1) throw TypeError("Generator is already running");
|
|
246
|
+
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
|
|
247
|
+
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
|
|
248
|
+
try {
|
|
249
|
+
if (f = 2, i) {
|
|
250
|
+
if (c || (o = "next"), t = i[o]) {
|
|
251
|
+
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
|
|
252
|
+
if (!t.done) return t;
|
|
253
|
+
u = t.value, c < 2 && (c = 0);
|
|
254
|
+
} else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
|
|
255
|
+
i = e;
|
|
256
|
+
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
|
|
257
|
+
} catch (t) {
|
|
258
|
+
i = e, c = 1, u = t;
|
|
259
|
+
} finally {
|
|
260
|
+
f = 1;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return {
|
|
264
|
+
value: t,
|
|
265
|
+
done: y
|
|
266
|
+
};
|
|
254
267
|
};
|
|
255
|
-
}
|
|
268
|
+
}(r, o, i), !0), u;
|
|
256
269
|
}
|
|
257
|
-
|
|
258
|
-
var h = "suspendedStart",
|
|
259
|
-
l = "suspendedYield",
|
|
260
|
-
f = "executing",
|
|
261
|
-
s = "completed",
|
|
262
|
-
y = {};
|
|
270
|
+
var a = {};
|
|
263
271
|
function Generator() {}
|
|
264
272
|
function GeneratorFunction() {}
|
|
265
273
|
function GeneratorFunctionPrototype() {}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
274
|
-
function defineIteratorMethods(t) {
|
|
275
|
-
["next", "throw", "return"].forEach(function (e) {
|
|
276
|
-
define(t, e, function (t) {
|
|
277
|
-
return this._invoke(e, t);
|
|
278
|
-
});
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
function AsyncIterator(t, e) {
|
|
282
|
-
function invoke(r, o, i, a) {
|
|
283
|
-
var c = tryCatch(t[r], t, o);
|
|
284
|
-
if ("throw" !== c.type) {
|
|
285
|
-
var u = c.arg,
|
|
286
|
-
h = u.value;
|
|
287
|
-
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
288
|
-
invoke("next", t, i, a);
|
|
289
|
-
}, function (t) {
|
|
290
|
-
invoke("throw", t, i, a);
|
|
291
|
-
}) : e.resolve(h).then(function (t) {
|
|
292
|
-
u.value = t, i(u);
|
|
293
|
-
}, function (t) {
|
|
294
|
-
return invoke("throw", t, i, a);
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
a(c.arg);
|
|
298
|
-
}
|
|
299
|
-
var r;
|
|
300
|
-
o(this, "_invoke", {
|
|
301
|
-
value: function (t, n) {
|
|
302
|
-
function callInvokeWithMethodAndArg() {
|
|
303
|
-
return new e(function (e, r) {
|
|
304
|
-
invoke(t, n, e, r);
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
function makeInvokeMethod(e, r, n) {
|
|
312
|
-
var o = h;
|
|
313
|
-
return function (i, a) {
|
|
314
|
-
if (o === f) throw Error("Generator is already running");
|
|
315
|
-
if (o === s) {
|
|
316
|
-
if ("throw" === i) throw a;
|
|
317
|
-
return {
|
|
318
|
-
value: t,
|
|
319
|
-
done: !0
|
|
320
|
-
};
|
|
321
|
-
}
|
|
322
|
-
for (n.method = i, n.arg = a;;) {
|
|
323
|
-
var c = n.delegate;
|
|
324
|
-
if (c) {
|
|
325
|
-
var u = maybeInvokeDelegate(c, n);
|
|
326
|
-
if (u) {
|
|
327
|
-
if (u === y) continue;
|
|
328
|
-
return u;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
332
|
-
if (o === h) throw o = s, n.arg;
|
|
333
|
-
n.dispatchException(n.arg);
|
|
334
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
335
|
-
o = f;
|
|
336
|
-
var p = tryCatch(e, r, n);
|
|
337
|
-
if ("normal" === p.type) {
|
|
338
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
339
|
-
return {
|
|
340
|
-
value: p.arg,
|
|
341
|
-
done: n.done
|
|
342
|
-
};
|
|
343
|
-
}
|
|
344
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
345
|
-
}
|
|
346
|
-
};
|
|
274
|
+
t = Object.getPrototypeOf;
|
|
275
|
+
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
276
|
+
return this;
|
|
277
|
+
}), t),
|
|
278
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
279
|
+
function f(e) {
|
|
280
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
347
281
|
}
|
|
348
|
-
|
|
349
|
-
var n = r.method,
|
|
350
|
-
o = e.iterator[n];
|
|
351
|
-
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
352
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
353
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
354
|
-
var a = i.arg;
|
|
355
|
-
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
356
|
-
}
|
|
357
|
-
function pushTryEntry(t) {
|
|
358
|
-
var e = {
|
|
359
|
-
tryLoc: t[0]
|
|
360
|
-
};
|
|
361
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
362
|
-
}
|
|
363
|
-
function resetTryEntry(t) {
|
|
364
|
-
var e = t.completion || {};
|
|
365
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
366
|
-
}
|
|
367
|
-
function Context(t) {
|
|
368
|
-
this.tryEntries = [{
|
|
369
|
-
tryLoc: "root"
|
|
370
|
-
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
371
|
-
}
|
|
372
|
-
function values(e) {
|
|
373
|
-
if (e || "" === e) {
|
|
374
|
-
var r = e[a];
|
|
375
|
-
if (r) return r.call(e);
|
|
376
|
-
if ("function" == typeof e.next) return e;
|
|
377
|
-
if (!isNaN(e.length)) {
|
|
378
|
-
var o = -1,
|
|
379
|
-
i = function next() {
|
|
380
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
381
|
-
return next.value = t, next.done = !0, next;
|
|
382
|
-
};
|
|
383
|
-
return i.next = i;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
throw new TypeError(typeof e + " is not iterable");
|
|
387
|
-
}
|
|
388
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
389
|
-
value: GeneratorFunctionPrototype,
|
|
390
|
-
configurable: !0
|
|
391
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
392
|
-
value: GeneratorFunction,
|
|
393
|
-
configurable: !0
|
|
394
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
395
|
-
var e = "function" == typeof t && t.constructor;
|
|
396
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
397
|
-
}, e.mark = function (t) {
|
|
398
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
399
|
-
}, e.awrap = function (t) {
|
|
400
|
-
return {
|
|
401
|
-
__await: t
|
|
402
|
-
};
|
|
403
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
282
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
|
|
404
283
|
return this;
|
|
405
|
-
}),
|
|
406
|
-
void 0 === i && (i = Promise);
|
|
407
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
408
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
409
|
-
return t.done ? t.value : a.next();
|
|
410
|
-
});
|
|
411
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
412
|
-
return this;
|
|
413
|
-
}), define(g, "toString", function () {
|
|
284
|
+
}), _regeneratorDefine(u, "toString", function () {
|
|
414
285
|
return "[object Generator]";
|
|
415
|
-
}),
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
return r.reverse(), function next() {
|
|
420
|
-
for (; r.length;) {
|
|
421
|
-
var t = r.pop();
|
|
422
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
|
423
|
-
}
|
|
424
|
-
return next.done = !0, next;
|
|
286
|
+
}), (_regenerator = function () {
|
|
287
|
+
return {
|
|
288
|
+
w: i,
|
|
289
|
+
m: f
|
|
425
290
|
};
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
function handle(n, o) {
|
|
441
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
442
|
-
}
|
|
443
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
444
|
-
var i = this.tryEntries[o],
|
|
445
|
-
a = i.completion;
|
|
446
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
447
|
-
if (i.tryLoc <= this.prev) {
|
|
448
|
-
var c = n.call(i, "catchLoc"),
|
|
449
|
-
u = n.call(i, "finallyLoc");
|
|
450
|
-
if (c && u) {
|
|
451
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
452
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
453
|
-
} else if (c) {
|
|
454
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
455
|
-
} else {
|
|
456
|
-
if (!u) throw Error("try statement without catch or finally");
|
|
457
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
},
|
|
462
|
-
abrupt: function (t, e) {
|
|
463
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
464
|
-
var o = this.tryEntries[r];
|
|
465
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
466
|
-
var i = o;
|
|
467
|
-
break;
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
471
|
-
var a = i ? i.completion : {};
|
|
472
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
473
|
-
},
|
|
474
|
-
complete: function (t, e) {
|
|
475
|
-
if ("throw" === t.type) throw t.arg;
|
|
476
|
-
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
477
|
-
},
|
|
478
|
-
finish: function (t) {
|
|
479
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
480
|
-
var r = this.tryEntries[e];
|
|
481
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
482
|
-
}
|
|
483
|
-
},
|
|
484
|
-
catch: function (t) {
|
|
485
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
486
|
-
var r = this.tryEntries[e];
|
|
487
|
-
if (r.tryLoc === t) {
|
|
488
|
-
var n = r.completion;
|
|
489
|
-
if ("throw" === n.type) {
|
|
490
|
-
var o = n.arg;
|
|
491
|
-
resetTryEntry(r);
|
|
492
|
-
}
|
|
493
|
-
return o;
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
throw Error("illegal catch attempt");
|
|
497
|
-
},
|
|
498
|
-
delegateYield: function (e, r, n) {
|
|
499
|
-
return this.delegate = {
|
|
500
|
-
iterator: values(e),
|
|
501
|
-
resultName: r,
|
|
502
|
-
nextLoc: n
|
|
503
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
291
|
+
})();
|
|
292
|
+
}
|
|
293
|
+
function _regeneratorDefine(e, r, n, t) {
|
|
294
|
+
var i = Object.defineProperty;
|
|
295
|
+
try {
|
|
296
|
+
i({}, "", {});
|
|
297
|
+
} catch (e) {
|
|
298
|
+
i = 0;
|
|
299
|
+
}
|
|
300
|
+
_regeneratorDefine = function (e, r, n, t) {
|
|
301
|
+
function o(r, n) {
|
|
302
|
+
_regeneratorDefine(e, r, function (e) {
|
|
303
|
+
return this._invoke(r, n, e);
|
|
304
|
+
});
|
|
504
305
|
}
|
|
505
|
-
|
|
306
|
+
r ? i ? i(e, r, {
|
|
307
|
+
value: n,
|
|
308
|
+
enumerable: !t,
|
|
309
|
+
configurable: !t,
|
|
310
|
+
writable: !t
|
|
311
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
312
|
+
}, _regeneratorDefine(e, r, n, t);
|
|
506
313
|
}
|
|
507
314
|
function _slicedToArray(r, e) {
|
|
508
315
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
@@ -1376,7 +1183,7 @@
|
|
|
1376
1183
|
cache: 'no-cache'
|
|
1377
1184
|
};
|
|
1378
1185
|
var request = (/*#__PURE__*/function () {
|
|
1379
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
1186
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(url) {
|
|
1380
1187
|
var config,
|
|
1381
1188
|
_mergeDeep,
|
|
1382
1189
|
params,
|
|
@@ -1397,9 +1204,11 @@
|
|
|
1397
1204
|
labelKey,
|
|
1398
1205
|
valueKey,
|
|
1399
1206
|
data,
|
|
1400
|
-
_args = arguments
|
|
1401
|
-
|
|
1402
|
-
|
|
1207
|
+
_args = arguments,
|
|
1208
|
+
_t,
|
|
1209
|
+
_t2;
|
|
1210
|
+
return _regenerator().w(function (_context) {
|
|
1211
|
+
while (1) switch (_context.p = _context.n) {
|
|
1403
1212
|
case 0:
|
|
1404
1213
|
config = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
1405
1214
|
_mergeDeep = mergeDeep(defaultConfig, config), params = _mergeDeep.params, _mergeDeep$responseTy = _mergeDeep.responseType, responseType = _mergeDeep$responseTy === void 0 ? 'json' : _mergeDeep$responseTy, _mergeDeep$method = _mergeDeep.method, method = _mergeDeep$method === void 0 ? 'GET' : _mergeDeep$method, _mergeDeep$headers = _mergeDeep.headers, headers = _mergeDeep$headers === void 0 ? {} : _mergeDeep$headers, responseParse = _mergeDeep.responseParse, reset = _objectWithoutProperties(_mergeDeep, _excluded$5);
|
|
@@ -1415,35 +1224,35 @@
|
|
|
1415
1224
|
body = params;
|
|
1416
1225
|
}
|
|
1417
1226
|
}
|
|
1418
|
-
_context.
|
|
1419
|
-
_context.
|
|
1227
|
+
_context.p = 1;
|
|
1228
|
+
_context.n = 2;
|
|
1420
1229
|
return fetch(requestURL, _objectSpread2(_objectSpread2({}, reset), {}, {
|
|
1421
1230
|
method: method.toLocaleUpperCase(),
|
|
1422
1231
|
headers: headers,
|
|
1423
1232
|
body: body
|
|
1424
1233
|
}));
|
|
1425
|
-
case
|
|
1426
|
-
response = _context.
|
|
1234
|
+
case 2:
|
|
1235
|
+
response = _context.v;
|
|
1427
1236
|
if (!response.ok) {
|
|
1428
|
-
_context.
|
|
1237
|
+
_context.n = 7;
|
|
1429
1238
|
break;
|
|
1430
1239
|
}
|
|
1431
|
-
_context.
|
|
1240
|
+
_context.n = 3;
|
|
1432
1241
|
return response[responseType]();
|
|
1433
|
-
case
|
|
1434
|
-
res = _context.
|
|
1242
|
+
case 3:
|
|
1243
|
+
res = _context.v;
|
|
1435
1244
|
if (!responseParse) {
|
|
1436
|
-
_context.
|
|
1245
|
+
_context.n = 6;
|
|
1437
1246
|
break;
|
|
1438
1247
|
}
|
|
1439
1248
|
if (!(typeof responseParse === 'function')) {
|
|
1440
|
-
_context.
|
|
1249
|
+
_context.n = 4;
|
|
1441
1250
|
break;
|
|
1442
1251
|
}
|
|
1443
|
-
return _context.
|
|
1444
|
-
case
|
|
1252
|
+
return _context.a(2, Promise.resolve(responseParse(res)));
|
|
1253
|
+
case 4:
|
|
1445
1254
|
if (!isObj(responseParse)) {
|
|
1446
|
-
_context.
|
|
1255
|
+
_context.n = 5;
|
|
1447
1256
|
break;
|
|
1448
1257
|
}
|
|
1449
1258
|
_responseParse$dataKe = responseParse.dataKey, dataKey = _responseParse$dataKe === void 0 ? 'data' : _responseParse$dataKe, labelKey = responseParse.labelKey, valueKey = responseParse.valueKey;
|
|
@@ -1453,34 +1262,33 @@
|
|
|
1453
1262
|
value: item === null || item === void 0 ? void 0 : item[valueKey]
|
|
1454
1263
|
});
|
|
1455
1264
|
});
|
|
1456
|
-
return _context.
|
|
1457
|
-
case
|
|
1458
|
-
return _context.
|
|
1459
|
-
case
|
|
1460
|
-
return _context.
|
|
1461
|
-
case
|
|
1462
|
-
|
|
1463
|
-
_context.
|
|
1265
|
+
return _context.a(2, Promise.resolve(data));
|
|
1266
|
+
case 5:
|
|
1267
|
+
return _context.a(2, Promise.resolve(res));
|
|
1268
|
+
case 6:
|
|
1269
|
+
return _context.a(2, Promise.resolve(res));
|
|
1270
|
+
case 7:
|
|
1271
|
+
_t = response.status;
|
|
1272
|
+
_context.n = _t === 400 ? 8 : _t === 401 ? 9 : _t === 403 ? 10 : _t === 500 ? 10 : 11;
|
|
1464
1273
|
break;
|
|
1465
|
-
case
|
|
1466
|
-
return _context.
|
|
1467
|
-
case
|
|
1468
|
-
return _context.
|
|
1469
|
-
case
|
|
1470
|
-
return _context.
|
|
1471
|
-
case
|
|
1472
|
-
_context.
|
|
1274
|
+
case 8:
|
|
1275
|
+
return _context.a(3, 11);
|
|
1276
|
+
case 9:
|
|
1277
|
+
return _context.a(3, 11);
|
|
1278
|
+
case 10:
|
|
1279
|
+
return _context.a(3, 11);
|
|
1280
|
+
case 11:
|
|
1281
|
+
_context.n = 13;
|
|
1473
1282
|
break;
|
|
1474
|
-
case
|
|
1475
|
-
_context.
|
|
1476
|
-
|
|
1477
|
-
console.error('Request Failed',
|
|
1478
|
-
Promise.reject(
|
|
1479
|
-
case
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
}, _callee, null, [[4, 29]]);
|
|
1283
|
+
case 12:
|
|
1284
|
+
_context.p = 12;
|
|
1285
|
+
_t2 = _context.v;
|
|
1286
|
+
console.error('Request Failed', _t2);
|
|
1287
|
+
Promise.reject(_t2);
|
|
1288
|
+
case 13:
|
|
1289
|
+
return _context.a(2);
|
|
1290
|
+
}
|
|
1291
|
+
}, _callee, null, [[1, 12]]);
|
|
1484
1292
|
}));
|
|
1485
1293
|
return function (_x) {
|
|
1486
1294
|
return _ref.apply(this, arguments);
|
|
@@ -9126,25 +8934,23 @@
|
|
|
9126
8934
|
};
|
|
9127
8935
|
// 校验schema是否正常
|
|
9128
8936
|
var validateSchema = /*#__PURE__*/function () {
|
|
9129
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
9130
|
-
|
|
9131
|
-
|
|
8937
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(schema) {
|
|
8938
|
+
var _t;
|
|
8939
|
+
return _regenerator().w(function (_context) {
|
|
8940
|
+
while (1) switch (_context.p = _context.n) {
|
|
9132
8941
|
case 0:
|
|
9133
|
-
_context.
|
|
9134
|
-
_context.
|
|
8942
|
+
_context.p = 0;
|
|
8943
|
+
_context.n = 1;
|
|
9135
8944
|
return ajv.validateSchema(schema, true);
|
|
9136
|
-
case
|
|
9137
|
-
return _context.
|
|
9138
|
-
case
|
|
9139
|
-
_context.
|
|
9140
|
-
|
|
9141
|
-
console.error('Schema不符合规范, 请检查',
|
|
9142
|
-
return _context.
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
return _context.stop();
|
|
9146
|
-
}
|
|
9147
|
-
}, _callee, null, [[0, 6]]);
|
|
8945
|
+
case 1:
|
|
8946
|
+
return _context.a(2, _context.v);
|
|
8947
|
+
case 2:
|
|
8948
|
+
_context.p = 2;
|
|
8949
|
+
_t = _context.v;
|
|
8950
|
+
console.error('Schema不符合规范, 请检查', _t);
|
|
8951
|
+
return _context.a(2, false);
|
|
8952
|
+
}
|
|
8953
|
+
}, _callee, null, [[0, 2]]);
|
|
9148
8954
|
}));
|
|
9149
8955
|
return function validateSchema(_x) {
|
|
9150
8956
|
return _ref.apply(this, arguments);
|
|
@@ -9351,43 +9157,42 @@
|
|
|
9351
9157
|
},
|
|
9352
9158
|
loadDataSource: function loadDataSource() {
|
|
9353
9159
|
var _this3 = this;
|
|
9354
|
-
return _asyncToGenerator(/*#__PURE__*/
|
|
9160
|
+
return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
9355
9161
|
var _this3$widgetSchema, _this3$widgetSchema$u, _this3$widgetSchema$u2;
|
|
9356
|
-
var xhrConfig, url, params, reset, _this3$httpAdapter, _this3$httpAdapter$re, http, responseParse, remoteURL, requestParams;
|
|
9357
|
-
return
|
|
9358
|
-
while (1) switch (_context.
|
|
9162
|
+
var xhrConfig, url, params, reset, _this3$httpAdapter, _this3$httpAdapter$re, http, responseParse, remoteURL, requestParams, _t;
|
|
9163
|
+
return _regenerator().w(function (_context) {
|
|
9164
|
+
while (1) switch (_context.p = _context.n) {
|
|
9359
9165
|
case 0:
|
|
9360
9166
|
xhrConfig = (_this3$widgetSchema = _this3.widgetSchema) === null || _this3$widgetSchema === void 0 ? void 0 : (_this3$widgetSchema$u = _this3$widgetSchema['ui:component']) === null || _this3$widgetSchema$u === void 0 ? void 0 : (_this3$widgetSchema$u2 = _this3$widgetSchema$u.props) === null || _this3$widgetSchema$u2 === void 0 ? void 0 : _this3$widgetSchema$u2.remoteConfig;
|
|
9361
9167
|
if (!xhrConfig) {
|
|
9362
|
-
_context.
|
|
9168
|
+
_context.n = 4;
|
|
9363
9169
|
break;
|
|
9364
9170
|
}
|
|
9365
9171
|
url = xhrConfig.url, params = xhrConfig.params, reset = _objectWithoutProperties(xhrConfig, _excluded$4);
|
|
9366
9172
|
_this3$httpAdapter = _this3.httpAdapter, _this3$httpAdapter$re = _this3$httpAdapter.request, http = _this3$httpAdapter$re === void 0 ? request : _this3$httpAdapter$re, responseParse = _this3$httpAdapter.responseParse;
|
|
9367
|
-
_context.
|
|
9173
|
+
_context.p = 1;
|
|
9368
9174
|
_this3.loading = true;
|
|
9369
9175
|
remoteURL = _executeExpression(url, _this3);
|
|
9370
9176
|
requestParams = isObj(params) ? _executeExpression(params, _this3) : params;
|
|
9371
|
-
_context.
|
|
9177
|
+
_context.n = 2;
|
|
9372
9178
|
return http(remoteURL, _objectSpread2(_objectSpread2({}, reset), {}, {
|
|
9373
9179
|
params: requestParams,
|
|
9374
9180
|
responseParse: responseParse
|
|
9375
9181
|
}));
|
|
9376
|
-
case
|
|
9377
|
-
_this3.datasource = _context.
|
|
9182
|
+
case 2:
|
|
9183
|
+
_this3.datasource = _context.v;
|
|
9378
9184
|
_this3.loading = false;
|
|
9379
|
-
_context.
|
|
9185
|
+
_context.n = 4;
|
|
9380
9186
|
break;
|
|
9381
|
-
case
|
|
9382
|
-
_context.
|
|
9383
|
-
|
|
9187
|
+
case 3:
|
|
9188
|
+
_context.p = 3;
|
|
9189
|
+
_t = _context.v;
|
|
9384
9190
|
_this3.loading = false;
|
|
9385
|
-
console.error(
|
|
9386
|
-
case
|
|
9387
|
-
|
|
9388
|
-
return _context.stop();
|
|
9191
|
+
console.error(_t);
|
|
9192
|
+
case 4:
|
|
9193
|
+
return _context.a(2);
|
|
9389
9194
|
}
|
|
9390
|
-
}, _callee, null, [[
|
|
9195
|
+
}, _callee, null, [[1, 3]]);
|
|
9391
9196
|
}))();
|
|
9392
9197
|
},
|
|
9393
9198
|
setErrorTips: function setErrorTips(tips) {
|
|
@@ -10826,7 +10631,8 @@
|
|
|
10826
10631
|
key: key,
|
|
10827
10632
|
props: {
|
|
10828
10633
|
hideArrow: true,
|
|
10829
|
-
name: key
|
|
10634
|
+
name: key,
|
|
10635
|
+
contentHiddenType: 'hidden'
|
|
10830
10636
|
},
|
|
10831
10637
|
class: _this.collapseStyle === 'normal' ? ['mb15'] : []
|
|
10832
10638
|
}, [h('div', {
|