@jswork/antd-components 1.0.125 → 1.0.126

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jswork/antd-components",
3
- "version": "1.0.125",
3
+ "version": "1.0.126",
4
4
  "main": "dist/main.cjs.js",
5
5
  "module": "dist/main.esm.js",
6
6
  "types": "dist/main.d.ts",
package/src/lib/table.tsx CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Author: aric 1290657123@qq.com
3
3
  * @Date: 2025-10-03 07:11:26
4
4
  * @LastEditors: aric 1290657123@qq.com
5
- * @LastEditTime: 2025-10-23 17:07:52
5
+ * @LastEditTime: 2025-10-23 17:41:15
6
6
  */
7
7
  import type { EventMittNamespace } from '@jswork/event-mitt';
8
8
  import { ReactHarmonyEvents } from '@jswork/harmony-events';
@@ -53,6 +53,11 @@ export type AcTableProps = TableProps & {
53
53
  * @param size
54
54
  */
55
55
  onPageChange?: (page: number, size: number) => void;
56
+ /**
57
+ * When destroy success.
58
+ * @param model
59
+ */
60
+ onDestroySuccess?: (model: any) => void;
56
61
  /**
57
62
  * Default page.
58
63
  */
@@ -171,11 +176,12 @@ export class AcTable extends React.Component<AcTableProps, AcTableState> {
171
176
  };
172
177
 
173
178
  public toDestroy = (item) => {
174
- const { name } = this.props;
179
+ const { name, onDestroySuccess } = this.props;
175
180
  this.setState({ isLoading: true });
176
181
  nx.$api[`${name}_destroy`](item)
177
182
  .then(this.refetch)
178
183
  .finally(() => {
184
+ onDestroySuccess?.(item);
179
185
  this.setState({ isLoading: false });
180
186
  });
181
187
  };