@magicbe/antd-crud 0.0.45 → 0.0.46

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.
@@ -250,6 +250,7 @@ export var DeleteAction = function (_a) {
250
250
  var _b = _a.children, children = _b === void 0 ? delete_action_default_children : _b;
251
251
  var _c = Modal.useModal(), modalInstance = _c[0], modalContextHolder = _c[1];
252
252
  var _d = useTableContext(), table_ref = _d.table_ref, filter_ref = _d.filter_ref, del = _d.del;
253
+ var showErrorModal = useCrudConfigContext().showErrorModal;
253
254
  var _e = useState(false), loading = _e[0], setLoading = _e[1];
254
255
  var onClick = function () { return __awaiter(void 0, void 0, void 0, function () {
255
256
  var keys, rows, before, handle, after, res, page_data, filter_data, error_2;
@@ -329,7 +330,7 @@ export var DeleteAction = function (_a) {
329
330
  return [3 /*break*/, 3];
330
331
  case 2:
331
332
  error_3 = _a.sent();
332
- modalInstance.error({
333
+ showErrorModal && modalInstance.error({
333
334
  title: "错误",
334
335
  content: String(error_3)
335
336
  });
@@ -452,6 +452,7 @@ var delete_action_default_children = (_jsxs(Button, { size: "small", type: "link
452
452
  export var DeleteAction = function (_a) {
453
453
  var _b = _a.children, children = _b === void 0 ? delete_action_default_children : _b, row = _a.row;
454
454
  var _c = useTableContext(), table_ref = _c.table_ref, filter_ref = _c.filter_ref, del = _c.del, rowKey = _c.rowKey;
455
+ var showErrorModal = useCrudConfigContext().showErrorModal;
455
456
  var _d = Modal.useModal(), modalInstance = _d[0], modalContextHolder = _d[1];
456
457
  var _e = useState(false), loading = _e[0], setLoading = _e[1];
457
458
  var _f = useMemo(function () {
@@ -529,7 +530,7 @@ export var DeleteAction = function (_a) {
529
530
  return [3 /*break*/, 3];
530
531
  case 2:
531
532
  error_5 = _a.sent();
532
- modalInstance.error({
533
+ showErrorModal && modalInstance.error({
533
534
  title: "错误",
534
535
  content: String(error_5)
535
536
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magicbe/antd-crud",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "description": "antd crud table",
5
5
  "author": "wang quan",
6
6
  "private": false,