@quansitech/antd-admin 1.1.24 → 1.1.26
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/components/Table/Action/Button.js +14 -10
- package/dist/lib/upload.js +12 -11
- package/package.json +1 -1
|
@@ -36,7 +36,7 @@ export default function (props) {
|
|
|
36
36
|
return _context2.abrupt("return");
|
|
37
37
|
case 4:
|
|
38
38
|
if (!props.request) {
|
|
39
|
-
_context2.next =
|
|
39
|
+
_context2.next = 29;
|
|
40
40
|
break;
|
|
41
41
|
}
|
|
42
42
|
setLoading(true);
|
|
@@ -107,31 +107,35 @@ export default function (props) {
|
|
|
107
107
|
_context2.next = 24;
|
|
108
108
|
return (_tableContext$getActi = tableContext.getActionRef()) === null || _tableContext$getActi === void 0 ? void 0 : _tableContext$getActi.reload();
|
|
109
109
|
case 24:
|
|
110
|
-
|
|
110
|
+
if (props.relateSelection) {
|
|
111
|
+
tableContext.getActionRef().clearSelected();
|
|
112
|
+
}
|
|
113
|
+
case 25:
|
|
114
|
+
_context2.prev = 25;
|
|
111
115
|
setLoading(false);
|
|
112
|
-
return _context2.finish(
|
|
113
|
-
case 27:
|
|
114
|
-
return _context2.abrupt("return");
|
|
116
|
+
return _context2.finish(25);
|
|
115
117
|
case 28:
|
|
118
|
+
return _context2.abrupt("return");
|
|
119
|
+
case 29:
|
|
116
120
|
if (!props.modal) {
|
|
117
|
-
_context2.next =
|
|
121
|
+
_context2.next = 35;
|
|
118
122
|
break;
|
|
119
123
|
}
|
|
120
124
|
setLoading(true);
|
|
121
|
-
_context2.next =
|
|
125
|
+
_context2.next = 33;
|
|
122
126
|
return modalShow(_objectSpread(_objectSpread({}, props.modal), {}, {
|
|
123
127
|
contexts: {
|
|
124
128
|
tableContext: tableContext
|
|
125
129
|
}
|
|
126
130
|
}));
|
|
127
|
-
case
|
|
131
|
+
case 33:
|
|
128
132
|
setLoading(false);
|
|
129
133
|
return _context2.abrupt("return");
|
|
130
|
-
case
|
|
134
|
+
case 35:
|
|
131
135
|
case "end":
|
|
132
136
|
return _context2.stop();
|
|
133
137
|
}
|
|
134
|
-
}, _callee, null, [[19,,
|
|
138
|
+
}, _callee, null, [[19,, 25, 28]]);
|
|
135
139
|
}));
|
|
136
140
|
return function onClick() {
|
|
137
141
|
return _ref.apply(this, arguments);
|
package/dist/lib/upload.js
CHANGED
|
@@ -17,7 +17,7 @@ export function customRequest(_x) {
|
|
|
17
17
|
function _customRequest() {
|
|
18
18
|
_customRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(options) {
|
|
19
19
|
var _options$file;
|
|
20
|
-
var policyRes, formData, url, key, res, _e$response;
|
|
20
|
+
var policyRes, formData, url, key, res, err, _e$response;
|
|
21
21
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
22
22
|
while (1) switch (_context.prev = _context.next) {
|
|
23
23
|
case 0:
|
|
@@ -77,21 +77,22 @@ function _customRequest() {
|
|
|
77
77
|
});
|
|
78
78
|
case 14:
|
|
79
79
|
res = _context.sent;
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
err = res.data.info || res.data.err_msg;
|
|
81
|
+
if (!err) {
|
|
82
|
+
_context.next = 20;
|
|
82
83
|
break;
|
|
83
84
|
}
|
|
84
|
-
message.error(
|
|
85
|
-
options.onError && options.onError(new Error(
|
|
85
|
+
message.error(err);
|
|
86
|
+
options.onError && options.onError(new Error(err), res.data);
|
|
86
87
|
return _context.abrupt("return");
|
|
87
|
-
case
|
|
88
|
+
case 20:
|
|
88
89
|
options.onSuccess && options.onSuccess(_objectSpread(_objectSpread({}, res.data), {}, {
|
|
89
90
|
url: res.data.url || res.data.file_url
|
|
90
91
|
}));
|
|
91
|
-
_context.next =
|
|
92
|
+
_context.next = 28;
|
|
92
93
|
break;
|
|
93
|
-
case
|
|
94
|
-
_context.prev =
|
|
94
|
+
case 23:
|
|
95
|
+
_context.prev = 23;
|
|
95
96
|
_context.t0 = _context["catch"](11);
|
|
96
97
|
if (_context.t0 instanceof AxiosError) {
|
|
97
98
|
options.onError && options.onError(_context.t0, (_e$response = _context.t0.response) === null || _e$response === void 0 ? void 0 : _e$response.data);
|
|
@@ -105,11 +106,11 @@ function _customRequest() {
|
|
|
105
106
|
});
|
|
106
107
|
}
|
|
107
108
|
throw _context.t0;
|
|
108
|
-
case
|
|
109
|
+
case 28:
|
|
109
110
|
case "end":
|
|
110
111
|
return _context.stop();
|
|
111
112
|
}
|
|
112
|
-
}, _callee, null, [[11,
|
|
113
|
+
}, _callee, null, [[11, 23]]);
|
|
113
114
|
}));
|
|
114
115
|
return _customRequest.apply(this, arguments);
|
|
115
116
|
}
|