@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-es.js
CHANGED
|
@@ -195,306 +195,113 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
195
195
|
}
|
|
196
196
|
return t;
|
|
197
197
|
}
|
|
198
|
-
function
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
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
|
-
|
|
198
|
+
function _regenerator() {
|
|
199
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
|
|
200
|
+
var e,
|
|
201
|
+
t,
|
|
202
|
+
r = "function" == typeof Symbol ? Symbol : {},
|
|
203
|
+
n = r.iterator || "@@iterator",
|
|
204
|
+
o = r.toStringTag || "@@toStringTag";
|
|
205
|
+
function i(r, n, o, i) {
|
|
206
|
+
var c = n && n.prototype instanceof Generator ? n : Generator,
|
|
207
|
+
u = Object.create(c.prototype);
|
|
208
|
+
return _regeneratorDefine(u, "_invoke", function (r, n, o) {
|
|
209
|
+
var i,
|
|
210
|
+
c,
|
|
211
|
+
u,
|
|
212
|
+
f = 0,
|
|
213
|
+
p = o || [],
|
|
214
|
+
y = !1,
|
|
215
|
+
G = {
|
|
216
|
+
p: 0,
|
|
217
|
+
n: 0,
|
|
218
|
+
v: e,
|
|
219
|
+
a: d,
|
|
220
|
+
f: d.bind(e, 4),
|
|
221
|
+
d: function (t, r) {
|
|
222
|
+
return i = t, c = 0, u = e, G.n = r, a;
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
function d(r, n) {
|
|
226
|
+
for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
|
|
227
|
+
var o,
|
|
228
|
+
i = p[t],
|
|
229
|
+
d = G.p,
|
|
230
|
+
l = i[2];
|
|
231
|
+
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));
|
|
232
|
+
}
|
|
233
|
+
if (o || r > 1) return a;
|
|
234
|
+
throw y = !0, n;
|
|
235
|
+
}
|
|
236
|
+
return function (o, p, l) {
|
|
237
|
+
if (f > 1) throw TypeError("Generator is already running");
|
|
238
|
+
for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
|
|
239
|
+
i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
|
|
240
|
+
try {
|
|
241
|
+
if (f = 2, i) {
|
|
242
|
+
if (c || (o = "next"), t = i[o]) {
|
|
243
|
+
if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
|
|
244
|
+
if (!t.done) return t;
|
|
245
|
+
u = t.value, c < 2 && (c = 0);
|
|
246
|
+
} else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
|
|
247
|
+
i = e;
|
|
248
|
+
} else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
|
|
249
|
+
} catch (t) {
|
|
250
|
+
i = e, c = 1, u = t;
|
|
251
|
+
} finally {
|
|
252
|
+
f = 1;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return {
|
|
256
|
+
value: t,
|
|
257
|
+
done: y
|
|
258
|
+
};
|
|
246
259
|
};
|
|
247
|
-
}
|
|
260
|
+
}(r, o, i), !0), u;
|
|
248
261
|
}
|
|
249
|
-
|
|
250
|
-
var h = "suspendedStart",
|
|
251
|
-
l = "suspendedYield",
|
|
252
|
-
f = "executing",
|
|
253
|
-
s = "completed",
|
|
254
|
-
y = {};
|
|
262
|
+
var a = {};
|
|
255
263
|
function Generator() {}
|
|
256
264
|
function GeneratorFunction() {}
|
|
257
265
|
function GeneratorFunctionPrototype() {}
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
266
|
-
function defineIteratorMethods(t) {
|
|
267
|
-
["next", "throw", "return"].forEach(function (e) {
|
|
268
|
-
define(t, e, function (t) {
|
|
269
|
-
return this._invoke(e, t);
|
|
270
|
-
});
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
function AsyncIterator(t, e) {
|
|
274
|
-
function invoke(r, o, i, a) {
|
|
275
|
-
var c = tryCatch(t[r], t, o);
|
|
276
|
-
if ("throw" !== c.type) {
|
|
277
|
-
var u = c.arg,
|
|
278
|
-
h = u.value;
|
|
279
|
-
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
280
|
-
invoke("next", t, i, a);
|
|
281
|
-
}, function (t) {
|
|
282
|
-
invoke("throw", t, i, a);
|
|
283
|
-
}) : e.resolve(h).then(function (t) {
|
|
284
|
-
u.value = t, i(u);
|
|
285
|
-
}, function (t) {
|
|
286
|
-
return invoke("throw", t, i, a);
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
a(c.arg);
|
|
290
|
-
}
|
|
291
|
-
var r;
|
|
292
|
-
o(this, "_invoke", {
|
|
293
|
-
value: function (t, n) {
|
|
294
|
-
function callInvokeWithMethodAndArg() {
|
|
295
|
-
return new e(function (e, r) {
|
|
296
|
-
invoke(t, n, e, r);
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
300
|
-
}
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
function makeInvokeMethod(e, r, n) {
|
|
304
|
-
var o = h;
|
|
305
|
-
return function (i, a) {
|
|
306
|
-
if (o === f) throw Error("Generator is already running");
|
|
307
|
-
if (o === s) {
|
|
308
|
-
if ("throw" === i) throw a;
|
|
309
|
-
return {
|
|
310
|
-
value: t,
|
|
311
|
-
done: !0
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
for (n.method = i, n.arg = a;;) {
|
|
315
|
-
var c = n.delegate;
|
|
316
|
-
if (c) {
|
|
317
|
-
var u = maybeInvokeDelegate(c, n);
|
|
318
|
-
if (u) {
|
|
319
|
-
if (u === y) continue;
|
|
320
|
-
return u;
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
324
|
-
if (o === h) throw o = s, n.arg;
|
|
325
|
-
n.dispatchException(n.arg);
|
|
326
|
-
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
327
|
-
o = f;
|
|
328
|
-
var p = tryCatch(e, r, n);
|
|
329
|
-
if ("normal" === p.type) {
|
|
330
|
-
if (o = n.done ? s : l, p.arg === y) continue;
|
|
331
|
-
return {
|
|
332
|
-
value: p.arg,
|
|
333
|
-
done: n.done
|
|
334
|
-
};
|
|
335
|
-
}
|
|
336
|
-
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
337
|
-
}
|
|
338
|
-
};
|
|
266
|
+
t = Object.getPrototypeOf;
|
|
267
|
+
var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
|
|
268
|
+
return this;
|
|
269
|
+
}), t),
|
|
270
|
+
u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
|
|
271
|
+
function f(e) {
|
|
272
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
|
|
339
273
|
}
|
|
340
|
-
|
|
341
|
-
var n = r.method,
|
|
342
|
-
o = e.iterator[n];
|
|
343
|
-
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;
|
|
344
|
-
var i = tryCatch(o, e.iterator, r.arg);
|
|
345
|
-
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
346
|
-
var a = i.arg;
|
|
347
|
-
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);
|
|
348
|
-
}
|
|
349
|
-
function pushTryEntry(t) {
|
|
350
|
-
var e = {
|
|
351
|
-
tryLoc: t[0]
|
|
352
|
-
};
|
|
353
|
-
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
354
|
-
}
|
|
355
|
-
function resetTryEntry(t) {
|
|
356
|
-
var e = t.completion || {};
|
|
357
|
-
e.type = "normal", delete e.arg, t.completion = e;
|
|
358
|
-
}
|
|
359
|
-
function Context(t) {
|
|
360
|
-
this.tryEntries = [{
|
|
361
|
-
tryLoc: "root"
|
|
362
|
-
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
363
|
-
}
|
|
364
|
-
function values(e) {
|
|
365
|
-
if (e || "" === e) {
|
|
366
|
-
var r = e[a];
|
|
367
|
-
if (r) return r.call(e);
|
|
368
|
-
if ("function" == typeof e.next) return e;
|
|
369
|
-
if (!isNaN(e.length)) {
|
|
370
|
-
var o = -1,
|
|
371
|
-
i = function next() {
|
|
372
|
-
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
373
|
-
return next.value = t, next.done = !0, next;
|
|
374
|
-
};
|
|
375
|
-
return i.next = i;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
throw new TypeError(typeof e + " is not iterable");
|
|
379
|
-
}
|
|
380
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
381
|
-
value: GeneratorFunctionPrototype,
|
|
382
|
-
configurable: !0
|
|
383
|
-
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
384
|
-
value: GeneratorFunction,
|
|
385
|
-
configurable: !0
|
|
386
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
387
|
-
var e = "function" == typeof t && t.constructor;
|
|
388
|
-
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
389
|
-
}, e.mark = function (t) {
|
|
390
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
391
|
-
}, e.awrap = function (t) {
|
|
392
|
-
return {
|
|
393
|
-
__await: t
|
|
394
|
-
};
|
|
395
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
274
|
+
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 () {
|
|
396
275
|
return this;
|
|
397
|
-
}),
|
|
398
|
-
void 0 === i && (i = Promise);
|
|
399
|
-
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
400
|
-
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
401
|
-
return t.done ? t.value : a.next();
|
|
402
|
-
});
|
|
403
|
-
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
404
|
-
return this;
|
|
405
|
-
}), define(g, "toString", function () {
|
|
276
|
+
}), _regeneratorDefine(u, "toString", function () {
|
|
406
277
|
return "[object Generator]";
|
|
407
|
-
}),
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
return r.reverse(), function next() {
|
|
412
|
-
for (; r.length;) {
|
|
413
|
-
var t = r.pop();
|
|
414
|
-
if (t in e) return next.value = t, next.done = !1, next;
|
|
415
|
-
}
|
|
416
|
-
return next.done = !0, next;
|
|
278
|
+
}), (_regenerator = function () {
|
|
279
|
+
return {
|
|
280
|
+
w: i,
|
|
281
|
+
m: f
|
|
417
282
|
};
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
function handle(n, o) {
|
|
433
|
-
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
434
|
-
}
|
|
435
|
-
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
436
|
-
var i = this.tryEntries[o],
|
|
437
|
-
a = i.completion;
|
|
438
|
-
if ("root" === i.tryLoc) return handle("end");
|
|
439
|
-
if (i.tryLoc <= this.prev) {
|
|
440
|
-
var c = n.call(i, "catchLoc"),
|
|
441
|
-
u = n.call(i, "finallyLoc");
|
|
442
|
-
if (c && u) {
|
|
443
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
444
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
445
|
-
} else if (c) {
|
|
446
|
-
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
447
|
-
} else {
|
|
448
|
-
if (!u) throw Error("try statement without catch or finally");
|
|
449
|
-
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
},
|
|
454
|
-
abrupt: function (t, e) {
|
|
455
|
-
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
456
|
-
var o = this.tryEntries[r];
|
|
457
|
-
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
458
|
-
var i = o;
|
|
459
|
-
break;
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
463
|
-
var a = i ? i.completion : {};
|
|
464
|
-
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
465
|
-
},
|
|
466
|
-
complete: function (t, e) {
|
|
467
|
-
if ("throw" === t.type) throw t.arg;
|
|
468
|
-
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;
|
|
469
|
-
},
|
|
470
|
-
finish: function (t) {
|
|
471
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
472
|
-
var r = this.tryEntries[e];
|
|
473
|
-
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
474
|
-
}
|
|
475
|
-
},
|
|
476
|
-
catch: function (t) {
|
|
477
|
-
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
478
|
-
var r = this.tryEntries[e];
|
|
479
|
-
if (r.tryLoc === t) {
|
|
480
|
-
var n = r.completion;
|
|
481
|
-
if ("throw" === n.type) {
|
|
482
|
-
var o = n.arg;
|
|
483
|
-
resetTryEntry(r);
|
|
484
|
-
}
|
|
485
|
-
return o;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
throw Error("illegal catch attempt");
|
|
489
|
-
},
|
|
490
|
-
delegateYield: function (e, r, n) {
|
|
491
|
-
return this.delegate = {
|
|
492
|
-
iterator: values(e),
|
|
493
|
-
resultName: r,
|
|
494
|
-
nextLoc: n
|
|
495
|
-
}, "next" === this.method && (this.arg = t), y;
|
|
283
|
+
})();
|
|
284
|
+
}
|
|
285
|
+
function _regeneratorDefine(e, r, n, t) {
|
|
286
|
+
var i = Object.defineProperty;
|
|
287
|
+
try {
|
|
288
|
+
i({}, "", {});
|
|
289
|
+
} catch (e) {
|
|
290
|
+
i = 0;
|
|
291
|
+
}
|
|
292
|
+
_regeneratorDefine = function (e, r, n, t) {
|
|
293
|
+
function o(r, n) {
|
|
294
|
+
_regeneratorDefine(e, r, function (e) {
|
|
295
|
+
return this._invoke(r, n, e);
|
|
296
|
+
});
|
|
496
297
|
}
|
|
497
|
-
|
|
298
|
+
r ? i ? i(e, r, {
|
|
299
|
+
value: n,
|
|
300
|
+
enumerable: !t,
|
|
301
|
+
configurable: !t,
|
|
302
|
+
writable: !t
|
|
303
|
+
}) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
|
|
304
|
+
}, _regeneratorDefine(e, r, n, t);
|
|
498
305
|
}
|
|
499
306
|
function _slicedToArray(r, e) {
|
|
500
307
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
@@ -1368,7 +1175,7 @@ var defaultConfig = {
|
|
|
1368
1175
|
cache: 'no-cache'
|
|
1369
1176
|
};
|
|
1370
1177
|
var request = (/*#__PURE__*/function () {
|
|
1371
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
1178
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(url) {
|
|
1372
1179
|
var config,
|
|
1373
1180
|
_mergeDeep,
|
|
1374
1181
|
params,
|
|
@@ -1389,9 +1196,11 @@ var request = (/*#__PURE__*/function () {
|
|
|
1389
1196
|
labelKey,
|
|
1390
1197
|
valueKey,
|
|
1391
1198
|
data,
|
|
1392
|
-
_args = arguments
|
|
1393
|
-
|
|
1394
|
-
|
|
1199
|
+
_args = arguments,
|
|
1200
|
+
_t,
|
|
1201
|
+
_t2;
|
|
1202
|
+
return _regenerator().w(function (_context) {
|
|
1203
|
+
while (1) switch (_context.p = _context.n) {
|
|
1395
1204
|
case 0:
|
|
1396
1205
|
config = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
|
|
1397
1206
|
_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);
|
|
@@ -1407,35 +1216,35 @@ var request = (/*#__PURE__*/function () {
|
|
|
1407
1216
|
body = params;
|
|
1408
1217
|
}
|
|
1409
1218
|
}
|
|
1410
|
-
_context.
|
|
1411
|
-
_context.
|
|
1219
|
+
_context.p = 1;
|
|
1220
|
+
_context.n = 2;
|
|
1412
1221
|
return fetch(requestURL, _objectSpread2(_objectSpread2({}, reset), {}, {
|
|
1413
1222
|
method: method.toLocaleUpperCase(),
|
|
1414
1223
|
headers: headers,
|
|
1415
1224
|
body: body
|
|
1416
1225
|
}));
|
|
1417
|
-
case
|
|
1418
|
-
response = _context.
|
|
1226
|
+
case 2:
|
|
1227
|
+
response = _context.v;
|
|
1419
1228
|
if (!response.ok) {
|
|
1420
|
-
_context.
|
|
1229
|
+
_context.n = 7;
|
|
1421
1230
|
break;
|
|
1422
1231
|
}
|
|
1423
|
-
_context.
|
|
1232
|
+
_context.n = 3;
|
|
1424
1233
|
return response[responseType]();
|
|
1425
|
-
case
|
|
1426
|
-
res = _context.
|
|
1234
|
+
case 3:
|
|
1235
|
+
res = _context.v;
|
|
1427
1236
|
if (!responseParse) {
|
|
1428
|
-
_context.
|
|
1237
|
+
_context.n = 6;
|
|
1429
1238
|
break;
|
|
1430
1239
|
}
|
|
1431
1240
|
if (!(typeof responseParse === 'function')) {
|
|
1432
|
-
_context.
|
|
1241
|
+
_context.n = 4;
|
|
1433
1242
|
break;
|
|
1434
1243
|
}
|
|
1435
|
-
return _context.
|
|
1436
|
-
case
|
|
1244
|
+
return _context.a(2, Promise.resolve(responseParse(res)));
|
|
1245
|
+
case 4:
|
|
1437
1246
|
if (!isObj(responseParse)) {
|
|
1438
|
-
_context.
|
|
1247
|
+
_context.n = 5;
|
|
1439
1248
|
break;
|
|
1440
1249
|
}
|
|
1441
1250
|
_responseParse$dataKe = responseParse.dataKey, dataKey = _responseParse$dataKe === void 0 ? 'data' : _responseParse$dataKe, labelKey = responseParse.labelKey, valueKey = responseParse.valueKey;
|
|
@@ -1445,34 +1254,33 @@ var request = (/*#__PURE__*/function () {
|
|
|
1445
1254
|
value: item === null || item === void 0 ? void 0 : item[valueKey]
|
|
1446
1255
|
});
|
|
1447
1256
|
});
|
|
1448
|
-
return _context.
|
|
1449
|
-
case
|
|
1450
|
-
return _context.
|
|
1451
|
-
case
|
|
1452
|
-
return _context.
|
|
1453
|
-
case
|
|
1454
|
-
|
|
1455
|
-
_context.
|
|
1257
|
+
return _context.a(2, Promise.resolve(data));
|
|
1258
|
+
case 5:
|
|
1259
|
+
return _context.a(2, Promise.resolve(res));
|
|
1260
|
+
case 6:
|
|
1261
|
+
return _context.a(2, Promise.resolve(res));
|
|
1262
|
+
case 7:
|
|
1263
|
+
_t = response.status;
|
|
1264
|
+
_context.n = _t === 400 ? 8 : _t === 401 ? 9 : _t === 403 ? 10 : _t === 500 ? 10 : 11;
|
|
1456
1265
|
break;
|
|
1457
|
-
case
|
|
1458
|
-
return _context.
|
|
1459
|
-
case
|
|
1460
|
-
return _context.
|
|
1461
|
-
case
|
|
1462
|
-
return _context.
|
|
1463
|
-
case
|
|
1464
|
-
_context.
|
|
1266
|
+
case 8:
|
|
1267
|
+
return _context.a(3, 11);
|
|
1268
|
+
case 9:
|
|
1269
|
+
return _context.a(3, 11);
|
|
1270
|
+
case 10:
|
|
1271
|
+
return _context.a(3, 11);
|
|
1272
|
+
case 11:
|
|
1273
|
+
_context.n = 13;
|
|
1465
1274
|
break;
|
|
1466
|
-
case
|
|
1467
|
-
_context.
|
|
1468
|
-
|
|
1469
|
-
console.error('Request Failed',
|
|
1470
|
-
Promise.reject(
|
|
1471
|
-
case
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
}, _callee, null, [[4, 29]]);
|
|
1275
|
+
case 12:
|
|
1276
|
+
_context.p = 12;
|
|
1277
|
+
_t2 = _context.v;
|
|
1278
|
+
console.error('Request Failed', _t2);
|
|
1279
|
+
Promise.reject(_t2);
|
|
1280
|
+
case 13:
|
|
1281
|
+
return _context.a(2);
|
|
1282
|
+
}
|
|
1283
|
+
}, _callee, null, [[1, 12]]);
|
|
1476
1284
|
}));
|
|
1477
1285
|
return function (_x) {
|
|
1478
1286
|
return _ref.apply(this, arguments);
|
|
@@ -9118,25 +8926,23 @@ var validateFormWithResult = function validateFormWithResult(widgetTree) {
|
|
|
9118
8926
|
};
|
|
9119
8927
|
// 校验schema是否正常
|
|
9120
8928
|
var validateSchema = /*#__PURE__*/function () {
|
|
9121
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
9122
|
-
|
|
9123
|
-
|
|
8929
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(schema) {
|
|
8930
|
+
var _t;
|
|
8931
|
+
return _regenerator().w(function (_context) {
|
|
8932
|
+
while (1) switch (_context.p = _context.n) {
|
|
9124
8933
|
case 0:
|
|
9125
|
-
_context.
|
|
9126
|
-
_context.
|
|
8934
|
+
_context.p = 0;
|
|
8935
|
+
_context.n = 1;
|
|
9127
8936
|
return ajv.validateSchema(schema, true);
|
|
9128
|
-
case
|
|
9129
|
-
return _context.
|
|
9130
|
-
case
|
|
9131
|
-
_context.
|
|
9132
|
-
|
|
9133
|
-
console.error('Schema不符合规范, 请检查',
|
|
9134
|
-
return _context.
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
return _context.stop();
|
|
9138
|
-
}
|
|
9139
|
-
}, _callee, null, [[0, 6]]);
|
|
8937
|
+
case 1:
|
|
8938
|
+
return _context.a(2, _context.v);
|
|
8939
|
+
case 2:
|
|
8940
|
+
_context.p = 2;
|
|
8941
|
+
_t = _context.v;
|
|
8942
|
+
console.error('Schema不符合规范, 请检查', _t);
|
|
8943
|
+
return _context.a(2, false);
|
|
8944
|
+
}
|
|
8945
|
+
}, _callee, null, [[0, 2]]);
|
|
9140
8946
|
}));
|
|
9141
8947
|
return function validateSchema(_x) {
|
|
9142
8948
|
return _ref.apply(this, arguments);
|
|
@@ -9343,43 +9149,42 @@ var Widget = Vue.extend({
|
|
|
9343
9149
|
},
|
|
9344
9150
|
loadDataSource: function loadDataSource() {
|
|
9345
9151
|
var _this3 = this;
|
|
9346
|
-
return _asyncToGenerator(/*#__PURE__*/
|
|
9152
|
+
return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
9347
9153
|
var _this3$widgetSchema, _this3$widgetSchema$u, _this3$widgetSchema$u2;
|
|
9348
|
-
var xhrConfig, url, params, reset, _this3$httpAdapter, _this3$httpAdapter$re, http, responseParse, remoteURL, requestParams;
|
|
9349
|
-
return
|
|
9350
|
-
while (1) switch (_context.
|
|
9154
|
+
var xhrConfig, url, params, reset, _this3$httpAdapter, _this3$httpAdapter$re, http, responseParse, remoteURL, requestParams, _t;
|
|
9155
|
+
return _regenerator().w(function (_context) {
|
|
9156
|
+
while (1) switch (_context.p = _context.n) {
|
|
9351
9157
|
case 0:
|
|
9352
9158
|
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;
|
|
9353
9159
|
if (!xhrConfig) {
|
|
9354
|
-
_context.
|
|
9160
|
+
_context.n = 4;
|
|
9355
9161
|
break;
|
|
9356
9162
|
}
|
|
9357
9163
|
url = xhrConfig.url, params = xhrConfig.params, reset = _objectWithoutProperties(xhrConfig, _excluded$4);
|
|
9358
9164
|
_this3$httpAdapter = _this3.httpAdapter, _this3$httpAdapter$re = _this3$httpAdapter.request, http = _this3$httpAdapter$re === void 0 ? request : _this3$httpAdapter$re, responseParse = _this3$httpAdapter.responseParse;
|
|
9359
|
-
_context.
|
|
9165
|
+
_context.p = 1;
|
|
9360
9166
|
_this3.loading = true;
|
|
9361
9167
|
remoteURL = _executeExpression(url, _this3);
|
|
9362
9168
|
requestParams = isObj(params) ? _executeExpression(params, _this3) : params;
|
|
9363
|
-
_context.
|
|
9169
|
+
_context.n = 2;
|
|
9364
9170
|
return http(remoteURL, _objectSpread2(_objectSpread2({}, reset), {}, {
|
|
9365
9171
|
params: requestParams,
|
|
9366
9172
|
responseParse: responseParse
|
|
9367
9173
|
}));
|
|
9368
|
-
case
|
|
9369
|
-
_this3.datasource = _context.
|
|
9174
|
+
case 2:
|
|
9175
|
+
_this3.datasource = _context.v;
|
|
9370
9176
|
_this3.loading = false;
|
|
9371
|
-
_context.
|
|
9177
|
+
_context.n = 4;
|
|
9372
9178
|
break;
|
|
9373
|
-
case
|
|
9374
|
-
_context.
|
|
9375
|
-
|
|
9179
|
+
case 3:
|
|
9180
|
+
_context.p = 3;
|
|
9181
|
+
_t = _context.v;
|
|
9376
9182
|
_this3.loading = false;
|
|
9377
|
-
console.error(
|
|
9378
|
-
case
|
|
9379
|
-
|
|
9380
|
-
return _context.stop();
|
|
9183
|
+
console.error(_t);
|
|
9184
|
+
case 4:
|
|
9185
|
+
return _context.a(2);
|
|
9381
9186
|
}
|
|
9382
|
-
}, _callee, null, [[
|
|
9187
|
+
}, _callee, null, [[1, 3]]);
|
|
9383
9188
|
}))();
|
|
9384
9189
|
},
|
|
9385
9190
|
setErrorTips: function setErrorTips(tips) {
|
|
@@ -10818,7 +10623,8 @@ var CollapseGroupWidget = Vue.extend({
|
|
|
10818
10623
|
key: key,
|
|
10819
10624
|
props: {
|
|
10820
10625
|
hideArrow: true,
|
|
10821
|
-
name: key
|
|
10626
|
+
name: key,
|
|
10627
|
+
contentHiddenType: 'hidden'
|
|
10822
10628
|
},
|
|
10823
10629
|
class: _this.collapseStyle === 'normal' ? ['mb15'] : []
|
|
10824
10630
|
}, [h('div', {
|