@jswork/antd-components 1.0.152 → 1.0.154

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.152",
3
+ "version": "1.0.154",
4
4
  "main": "dist/main.cjs.js",
5
5
  "module": "dist/main.esm.js",
6
6
  "types": "dist/main.d.ts",
@@ -35,9 +35,9 @@ export const AcTableExtras: FC<AcTableExtrasProps> = (props) => {
35
35
  const handleBack = () => history.back();
36
36
  const AsComponent = as || Space;
37
37
  const items = {
38
- reset: <BtnRefresh lang={lang} onClick={handleRefresh} />,
39
- add: <BtnCreate lang={lang} onClick={handleAdd} />,
40
- back: <BtnBack lang={lang} onClick={handleBack} />,
38
+ reset: <BtnRefresh key="reset" lang={lang} onClick={handleRefresh} />,
39
+ add: <BtnCreate key="add" lang={lang} onClick={handleAdd} />,
40
+ back: <BtnBack key="back" lang={lang} onClick={handleBack} />,
41
41
  };
42
42
 
43
43
  return (
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-26 19:35:27
5
+ * @LastEditTime: 2025-10-26 19:43:01
6
6
  *
7
7
  *
8
8
  * 路由风格: /{module}/{name} eg: /admin/staff-roles
@@ -175,13 +175,12 @@ export class AcTable extends React.Component<AcTableProps, AcTableState> {
175
175
  this.sync.cancel();
176
176
  }
177
177
 
178
- fetchData = async (page: number, size: number, extraParams?: Record<string, any>) => {
178
+ fetchData = async (page: number, size: number, overrideParams?: Record<string, any>) => {
179
179
  const abortController = new AbortController();
180
180
  const { params } = this.props;
181
- const { current, pageSize } = this.state;
182
- const lastParams = { current, pageSize, ...params, ...extraParams };
181
+ const lastParams = { ...params, ...overrideParams };
183
182
  this.setState({ isLoading: true });
184
- this.sync.schedule({ page: current, size: pageSize, ...lastParams });
183
+ this.sync.schedule({ page, size, ...lastParams });
185
184
  try {
186
185
  const result = await this.defaultFetcher({ current: page, pageSize: size, params: lastParams });
187
186
  if (!abortController.signal.aborted) {
@@ -300,6 +299,7 @@ export class AcTable extends React.Component<AcTableProps, AcTableState> {
300
299
  params,
301
300
  paramsAdd,
302
301
  paramsEdit,
302
+ paramsReset,
303
303
  fetcher,
304
304
  dataPath,
305
305
  totalPath,