amis 1.9.1-beta.23 → 1.9.1-beta.26
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/index.js +1 -1
- package/lib/renderers/Dialog.d.ts +147 -169
- package/lib/renderers/Dialog.js.map +2 -2
- package/lib/renderers/Form/index.d.ts +4 -4
- package/lib/renderers/Form/index.js +252 -252
- package/lib/renderers/Form/index.js.map +2 -2
- package/lib/themes/ang-ie11.css +4 -7
- package/lib/themes/ang.css +4 -7
- package/lib/themes/ang.css.map +1 -1
- package/lib/themes/antd-ie11.css +4 -7
- package/lib/themes/antd.css +4 -7
- package/lib/themes/antd.css.map +1 -1
- package/lib/themes/cxd-ie11.css +4 -7
- package/lib/themes/cxd.css +4 -7
- package/lib/themes/cxd.css.map +1 -1
- package/lib/themes/dark-ie11.css +4 -7
- package/lib/themes/dark.css +4 -7
- package/lib/themes/dark.css.map +1 -1
- package/lib/themes/default-ie11.css +4 -7
- package/lib/themes/default.css +4 -7
- package/lib/themes/default.css.map +1 -1
- package/lib/utils/helper.js +1 -1
- package/lib/utils/helper.js.map +2 -2
- package/package.json +1 -1
- package/schema.json +24 -19
- package/scss/components/form/_date.scss +19 -11
- package/sdk/ang-ie11.css +4 -8
- package/sdk/ang.css +4 -8
- package/sdk/antd-ie11.css +4 -8
- package/sdk/antd.css +4 -8
- package/sdk/barcode.js +51 -51
- package/sdk/charts.js +14 -14
- package/sdk/codemirror.js +7 -7
- package/sdk/color-picker.js +65 -65
- package/sdk/cropperjs.js +2 -2
- package/sdk/cxd-ie11.css +4 -8
- package/sdk/cxd.css +4 -8
- package/sdk/dark-ie11.css +4 -8
- package/sdk/dark.css +4 -8
- package/sdk/exceljs.js +1 -1
- package/sdk/markdown.js +69 -69
- package/sdk/papaparse.js +1 -1
- package/sdk/renderers/Form/CityDB.js +1 -1
- package/sdk/rest.js +16 -16
- package/sdk/rich-text.js +62 -62
- package/sdk/sdk-ie11.css +4 -8
- package/sdk/sdk.css +4 -8
- package/sdk/sdk.js +1648 -1643
- package/sdk/thirds/hls.js/hls.js +1 -1
- package/sdk/thirds/mpegts.js/mpegts.js +1 -1
- package/sdk/tinymce.js +57 -57
- package/src/renderers/Dialog.tsx +0 -1
- package/src/renderers/Form/index.tsx +15 -24
- package/src/utils/helper.ts +2 -2
@@ -418,265 +418,265 @@ var Form = /** @class */ (function (_super) {
|
|
418
418
|
}, this.props.store.data);
|
419
419
|
};
|
420
420
|
Form.prototype.handleAction = function (e, action, data, throwErrors, delegate) {
|
421
|
-
var _this = this;
|
422
421
|
if (throwErrors === void 0) { throwErrors = false; }
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
422
|
+
return (0, tslib_1.__awaiter)(this, void 0, Promise, function () {
|
423
|
+
var _a, store, onSubmit, api, asyncApi, finishedField, checkInterval, _b, saveSuccess, saveFailed, resetAfterSubmit, clearAfterSubmit, onAction, onSaved, onReset, onFinished, onFailed, redirect, reload, target, env, onChange, clearPersistDataAfterSubmit, trimValues, dispatchEvent, __, fields, validationRes, dispatcher;
|
424
|
+
var _this = this;
|
425
|
+
return (0, tslib_1.__generator)(this, function (_c) {
|
426
|
+
switch (_c.label) {
|
427
|
+
case 0:
|
428
|
+
_a = this.props, store = _a.store, onSubmit = _a.onSubmit, api = _a.api, asyncApi = _a.asyncApi, finishedField = _a.finishedField, checkInterval = _a.checkInterval, _b = _a.messages, saveSuccess = _b.saveSuccess, saveFailed = _b.saveFailed, resetAfterSubmit = _a.resetAfterSubmit, clearAfterSubmit = _a.clearAfterSubmit, onAction = _a.onAction, onSaved = _a.onSaved, onReset = _a.onReset, onFinished = _a.onFinished, onFailed = _a.onFailed, redirect = _a.redirect, reload = _a.reload, target = _a.target, env = _a.env, onChange = _a.onChange, clearPersistDataAfterSubmit = _a.clearPersistDataAfterSubmit, trimValues = _a.trimValues, dispatchEvent = _a.dispatchEvent, __ = _a.translate;
|
429
|
+
// 做动作之前,先把数据同步一下。
|
430
|
+
this.flush();
|
431
|
+
if (trimValues) {
|
432
|
+
store.trimValues();
|
433
|
+
}
|
434
|
+
// 如果 data 就是当前层,则 flush 一下。
|
435
|
+
if (data === this.props.data) {
|
436
|
+
data = store.data;
|
437
|
+
}
|
438
|
+
if (!(Array.isArray(action.required) && action.required.length)) return [3 /*break*/, 3];
|
439
|
+
store.clearErrors(); // 如果是按钮指定了required,则校验前先清空一下遗留的校验报错
|
440
|
+
fields = action.required.map(function (item) { return ({
|
441
|
+
name: item,
|
442
|
+
rules: { isRequired: true }
|
443
|
+
}); });
|
444
|
+
return [4 /*yield*/, store.validateFields(fields)];
|
445
|
+
case 1:
|
446
|
+
validationRes = _c.sent();
|
447
|
+
if (!!validationRes) return [3 /*break*/, 3];
|
448
|
+
return [4 /*yield*/, dispatchEvent('validateError', this.props.data)];
|
449
|
+
case 2:
|
450
|
+
dispatcher = _c.sent();
|
451
|
+
if (!(dispatcher === null || dispatcher === void 0 ? void 0 : dispatcher.prevented)) {
|
452
|
+
env.notify('error', __('Form.validateFailed'));
|
453
|
+
}
|
454
|
+
/** 抛异常是为了在dialog中catch这个错误,避免弹窗直接关闭 */
|
455
|
+
return [2 /*return*/, Promise.reject(__('Form.validateFailed'))];
|
456
|
+
case 3:
|
457
|
+
if (action.type === 'submit' ||
|
458
|
+
action.actionType === 'submit' ||
|
459
|
+
action.actionType === 'confirm' ||
|
460
|
+
action.actionType === 'reset-and-submit' ||
|
461
|
+
action.actionType === 'clear-and-submit') {
|
462
|
+
store.setCurrentAction(action);
|
463
|
+
if (action.actionType === 'reset-and-submit') {
|
464
|
+
store.reset(onReset);
|
450
465
|
}
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
case 0:
|
545
|
-
onSaved && onSaved(values, response);
|
546
|
-
feedback = action.feedback || this.props.feedback;
|
547
|
-
if (!(feedback && (0, helper_1.isVisible)(feedback, store.data))) return [3 /*break*/, 2];
|
548
|
-
return [4 /*yield*/, this.openFeedback(feedback, store.data)];
|
549
|
-
case 1:
|
550
|
-
confirmed = _a.sent();
|
551
|
-
// 如果 feedback 配置了,取消就跳过原有逻辑。
|
552
|
-
if (feedback.skipRestOnCancel && !confirmed) {
|
553
|
-
throw new helper_1.SkipOperation();
|
466
|
+
else if (action.actionType === 'clear-and-submit') {
|
467
|
+
store.clear(onReset);
|
468
|
+
}
|
469
|
+
return [2 /*return*/, this.submit(function (values) {
|
470
|
+
var _a;
|
471
|
+
if (onSubmit && onSubmit(values, action) === false) {
|
472
|
+
return Promise.resolve(false);
|
473
|
+
}
|
474
|
+
// 走到这里代表校验成功了
|
475
|
+
dispatchEvent('validateSucc', _this.props.data);
|
476
|
+
if (target) {
|
477
|
+
_this.submitToTarget(target, values);
|
478
|
+
dispatchEvent('submitSucc', (0, helper_1.createObject)(_this.props.data, values));
|
479
|
+
}
|
480
|
+
else if (action.actionType === 'reload') {
|
481
|
+
action.target && _this.reloadTarget(action.target, values);
|
482
|
+
}
|
483
|
+
else if (action.actionType === 'dialog') {
|
484
|
+
store.openDialog(data);
|
485
|
+
}
|
486
|
+
else if (action.actionType === 'drawer') {
|
487
|
+
store.openDrawer(data);
|
488
|
+
}
|
489
|
+
else if ((0, api_1.isEffectiveApi)(action.api || api, values)) {
|
490
|
+
var finnalAsyncApi_1 = action.asyncApi || asyncApi;
|
491
|
+
(0, api_1.isEffectiveApi)(finnalAsyncApi_1, store.data) &&
|
492
|
+
store.updateData((_a = {},
|
493
|
+
_a[finishedField || 'finished'] = false,
|
494
|
+
_a));
|
495
|
+
return store
|
496
|
+
.saveRemote(action.api || api, values, {
|
497
|
+
successMessage: saveSuccess,
|
498
|
+
errorMessage: saveFailed,
|
499
|
+
onSuccess: function (result) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
|
500
|
+
var dispatcher, cbResult;
|
501
|
+
var _this = this;
|
502
|
+
return (0, tslib_1.__generator)(this, function (_a) {
|
503
|
+
switch (_a.label) {
|
504
|
+
case 0: return [4 /*yield*/, dispatchEvent('submitSucc', (0, helper_1.createObject)(this.props.data, { result: result }))];
|
505
|
+
case 1:
|
506
|
+
dispatcher = _a.sent();
|
507
|
+
if (!(0, api_1.isEffectiveApi)(finnalAsyncApi_1, store.data) ||
|
508
|
+
store.data[finishedField || 'finished']) {
|
509
|
+
return [2 /*return*/, {
|
510
|
+
cbResult: null,
|
511
|
+
dispatcher: dispatcher
|
512
|
+
}];
|
513
|
+
}
|
514
|
+
cbResult = (0, helper_1.until)(function () { return store.checkRemote(finnalAsyncApi_1, store.data); }, function (ret) { return ret && ret[finishedField || 'finished']; }, function (cancel) { return (_this.asyncCancel = cancel); }, checkInterval);
|
515
|
+
return [2 /*return*/, {
|
516
|
+
cbResult: cbResult,
|
517
|
+
dispatcher: dispatcher
|
518
|
+
}];
|
519
|
+
}
|
520
|
+
});
|
521
|
+
}); },
|
522
|
+
onFailed: function (result) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
|
523
|
+
var dispatcher;
|
524
|
+
return (0, tslib_1.__generator)(this, function (_a) {
|
525
|
+
switch (_a.label) {
|
526
|
+
case 0: return [4 /*yield*/, dispatchEvent('submitFail', (0, helper_1.createObject)(this.props.data, { error: result }))];
|
527
|
+
case 1:
|
528
|
+
dispatcher = _a.sent();
|
529
|
+
return [2 /*return*/, {
|
530
|
+
dispatcher: dispatcher
|
531
|
+
}];
|
532
|
+
}
|
533
|
+
});
|
534
|
+
}); }
|
535
|
+
})
|
536
|
+
.then(function (response) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
|
537
|
+
var feedback, confirmed;
|
538
|
+
return (0, tslib_1.__generator)(this, function (_a) {
|
539
|
+
switch (_a.label) {
|
540
|
+
case 0:
|
541
|
+
onSaved && onSaved(values, response);
|
542
|
+
feedback = action.feedback || this.props.feedback;
|
543
|
+
if (!(feedback && (0, helper_1.isVisible)(feedback, store.data))) return [3 /*break*/, 2];
|
544
|
+
return [4 /*yield*/, this.openFeedback(feedback, store.data)];
|
545
|
+
case 1:
|
546
|
+
confirmed = _a.sent();
|
547
|
+
// 如果 feedback 配置了,取消就跳过原有逻辑。
|
548
|
+
if (feedback.skipRestOnCancel && !confirmed) {
|
549
|
+
throw new helper_1.SkipOperation();
|
550
|
+
}
|
551
|
+
else if (feedback.skipRestOnConfirm && confirmed) {
|
552
|
+
throw new helper_1.SkipOperation();
|
553
|
+
}
|
554
|
+
_a.label = 2;
|
555
|
+
case 2: return [2 /*return*/];
|
556
|
+
}
|
557
|
+
});
|
558
|
+
}); });
|
554
559
|
}
|
555
|
-
else
|
556
|
-
|
560
|
+
else {
|
561
|
+
// type为submit,但是没有配api以及target时,只派发事件
|
562
|
+
dispatchEvent('submitSucc', (0, helper_1.createObject)(_this.props.data, values));
|
557
563
|
}
|
558
|
-
|
559
|
-
|
564
|
+
return Promise.resolve(null);
|
565
|
+
})
|
566
|
+
.then(function (values) {
|
567
|
+
// 有可能 onSubmit return false 了,那么后面的就不应该再执行了。
|
568
|
+
if (values === false) {
|
569
|
+
return store.data;
|
570
|
+
}
|
571
|
+
if (onFinished && onFinished(values, action) === false) {
|
572
|
+
return values;
|
573
|
+
}
|
574
|
+
resetAfterSubmit && store.reset(onReset);
|
575
|
+
clearAfterSubmit && store.clear(onReset);
|
576
|
+
clearPersistDataAfterSubmit && store.clearLocalPersistData();
|
577
|
+
if (action.redirect || redirect) {
|
578
|
+
var finalRedirect = (0, tpl_1.filter)(action.redirect || redirect, store.data);
|
579
|
+
finalRedirect && env.jumpTo(finalRedirect, action);
|
580
|
+
}
|
581
|
+
else if (action.reload || reload) {
|
582
|
+
_this.reloadTarget(action.reload || reload, store.data);
|
583
|
+
}
|
584
|
+
action.close && _this.closeTarget(action.close);
|
585
|
+
return values;
|
586
|
+
})
|
587
|
+
.catch(function (reason) {
|
588
|
+
if (reason instanceof helper_1.SkipOperation) {
|
589
|
+
return;
|
590
|
+
}
|
591
|
+
onFailed && onFailed(reason, store.errors);
|
592
|
+
if (throwErrors) {
|
593
|
+
throw reason;
|
594
|
+
}
|
595
|
+
})];
|
596
|
+
}
|
597
|
+
else if (action.type === 'reset' || action.actionType === 'reset') {
|
598
|
+
store.setCurrentAction(action);
|
599
|
+
store.reset(onReset);
|
600
|
+
}
|
601
|
+
else if (action.actionType === 'clear') {
|
602
|
+
store.setCurrentAction(action);
|
603
|
+
store.clear(onReset);
|
604
|
+
}
|
605
|
+
else if (action.actionType === 'validate') {
|
606
|
+
store.setCurrentAction(action);
|
607
|
+
this.validate(true);
|
608
|
+
}
|
609
|
+
else if (action.actionType === 'dialog') {
|
610
|
+
store.setCurrentAction(action);
|
611
|
+
store.openDialog(data);
|
612
|
+
}
|
613
|
+
else if (action.actionType === 'drawer') {
|
614
|
+
store.setCurrentAction(action);
|
615
|
+
store.openDrawer(data);
|
616
|
+
}
|
617
|
+
else if (action.actionType === 'ajax') {
|
618
|
+
store.setCurrentAction(action);
|
619
|
+
if (!(0, api_1.isEffectiveApi)(action.api)) {
|
620
|
+
return [2 /*return*/, env.alert(__("\u5F53 actionType \u4E3A ajax \u65F6\uFF0C\u8BF7\u8BBE\u7F6E api \u5C5E\u6027"))];
|
560
621
|
}
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
}
|
617
|
-
else if (action.actionType === 'drawer') {
|
618
|
-
store.setCurrentAction(action);
|
619
|
-
store.openDrawer(data);
|
620
|
-
}
|
621
|
-
else if (action.actionType === 'ajax') {
|
622
|
-
store.setCurrentAction(action);
|
623
|
-
if (!(0, api_1.isEffectiveApi)(action.api)) {
|
624
|
-
return env.alert(__("\u5F53 actionType \u4E3A ajax \u65F6\uFF0C\u8BF7\u8BBE\u7F6E api \u5C5E\u6027"));
|
625
|
-
}
|
626
|
-
return store
|
627
|
-
.saveRemote(action.api, data, {
|
628
|
-
successMessage: __((action.messages && action.messages.success) || saveSuccess),
|
629
|
-
errorMessage: __((action.messages && action.messages.failed) || saveFailed)
|
630
|
-
})
|
631
|
-
.then(function (response) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
|
632
|
-
var redirect;
|
633
|
-
return (0, tslib_1.__generator)(this, function (_a) {
|
634
|
-
switch (_a.label) {
|
635
|
-
case 0:
|
636
|
-
response &&
|
637
|
-
onChange &&
|
638
|
-
onChange(store.data, (0, helper_1.difference)(store.data, store.pristine), this.props);
|
639
|
-
if (!store.validated) return [3 /*break*/, 2];
|
640
|
-
return [4 /*yield*/, this.validate(true)];
|
641
|
-
case 1:
|
642
|
-
_a.sent();
|
643
|
-
_a.label = 2;
|
644
|
-
case 2:
|
645
|
-
if (!(action.feedback && (0, helper_1.isVisible)(action.feedback, store.data))) return [3 /*break*/, 4];
|
646
|
-
return [4 /*yield*/, this.openFeedback(action.feedback, store.data)];
|
647
|
-
case 3:
|
648
|
-
_a.sent();
|
649
|
-
_a.label = 4;
|
650
|
-
case 4:
|
651
|
-
redirect = action.redirect && (0, tpl_1.filter)(action.redirect, store.data);
|
652
|
-
redirect && env.jumpTo(redirect, action);
|
653
|
-
action.reload && this.reloadTarget(action.reload, store.data);
|
654
|
-
action.close && this.closeTarget(action.close);
|
655
|
-
return [2 /*return*/];
|
656
|
-
}
|
657
|
-
});
|
658
|
-
}); })
|
659
|
-
.catch(function (e) {
|
660
|
-
onFailed && onFailed(e, store.errors);
|
661
|
-
if (throwErrors || action.countDown) {
|
662
|
-
throw e;
|
622
|
+
return [2 /*return*/, store
|
623
|
+
.saveRemote(action.api, data, {
|
624
|
+
successMessage: __((action.messages && action.messages.success) || saveSuccess),
|
625
|
+
errorMessage: __((action.messages && action.messages.failed) || saveFailed)
|
626
|
+
})
|
627
|
+
.then(function (response) { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
|
628
|
+
var redirect;
|
629
|
+
return (0, tslib_1.__generator)(this, function (_a) {
|
630
|
+
switch (_a.label) {
|
631
|
+
case 0:
|
632
|
+
response &&
|
633
|
+
onChange &&
|
634
|
+
onChange(store.data, (0, helper_1.difference)(store.data, store.pristine), this.props);
|
635
|
+
if (!store.validated) return [3 /*break*/, 2];
|
636
|
+
return [4 /*yield*/, this.validate(true)];
|
637
|
+
case 1:
|
638
|
+
_a.sent();
|
639
|
+
_a.label = 2;
|
640
|
+
case 2:
|
641
|
+
if (!(action.feedback && (0, helper_1.isVisible)(action.feedback, store.data))) return [3 /*break*/, 4];
|
642
|
+
return [4 /*yield*/, this.openFeedback(action.feedback, store.data)];
|
643
|
+
case 3:
|
644
|
+
_a.sent();
|
645
|
+
_a.label = 4;
|
646
|
+
case 4:
|
647
|
+
redirect = action.redirect && (0, tpl_1.filter)(action.redirect, store.data);
|
648
|
+
redirect && env.jumpTo(redirect, action);
|
649
|
+
action.reload && this.reloadTarget(action.reload, store.data);
|
650
|
+
action.close && this.closeTarget(action.close);
|
651
|
+
return [2 /*return*/];
|
652
|
+
}
|
653
|
+
});
|
654
|
+
}); })
|
655
|
+
.catch(function (e) {
|
656
|
+
onFailed && onFailed(e, store.errors);
|
657
|
+
if (throwErrors || action.countDown) {
|
658
|
+
throw e;
|
659
|
+
}
|
660
|
+
})];
|
661
|
+
}
|
662
|
+
else if (action.actionType === 'reload') {
|
663
|
+
store.setCurrentAction(action);
|
664
|
+
if (action.target) {
|
665
|
+
this.reloadTarget(action.target, data);
|
666
|
+
}
|
667
|
+
else {
|
668
|
+
this.receive(data);
|
669
|
+
}
|
670
|
+
// action.target && this.reloadTarget(action.target, data);
|
671
|
+
}
|
672
|
+
else if (onAction) {
|
673
|
+
// 不识别的丢给上层去处理。
|
674
|
+
return [2 /*return*/, onAction(e, action, data, throwErrors, delegate || this.context)];
|
675
|
+
}
|
676
|
+
return [2 /*return*/];
|
663
677
|
}
|
664
678
|
});
|
665
|
-
}
|
666
|
-
else if (action.actionType === 'reload') {
|
667
|
-
store.setCurrentAction(action);
|
668
|
-
if (action.target) {
|
669
|
-
this.reloadTarget(action.target, data);
|
670
|
-
}
|
671
|
-
else {
|
672
|
-
this.receive(data);
|
673
|
-
}
|
674
|
-
// action.target && this.reloadTarget(action.target, data);
|
675
|
-
}
|
676
|
-
else if (onAction) {
|
677
|
-
// 不识别的丢给上层去处理。
|
678
|
-
return onAction(e, action, data, throwErrors, delegate || this.context);
|
679
|
-
}
|
679
|
+
});
|
680
680
|
};
|
681
681
|
Form.prototype.handleQuery = function (query) {
|
682
682
|
var _a, _b;
|