react-toolkits 2.13.25 → 2.13.27

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # react-toolkits
2
2
 
3
+ ## 2.13.27
4
+
5
+ ### Patch Changes
6
+
7
+ - 40e6d81: fix: the return of getTotal and getDataSource are not right
8
+
9
+ ## 2.13.26
10
+
11
+ ### Patch Changes
12
+
13
+ - 546fd76: feat: remove isValidating
14
+
3
15
  ## 2.13.25
4
16
 
5
17
  ### Patch Changes
package/lib/index.js CHANGED
@@ -1352,7 +1352,7 @@ var init_QueryList = __esm({
1352
1352
  return serializedKey;
1353
1353
  }, [accessible, isValid, url4, requestConfig]);
1354
1354
  const { axios: axios2 } = useToolkitsStore((s) => s);
1355
- const { data, isLoading, isValidating } = useSWR6(
1355
+ const { data, isLoading } = useSWR6(
1356
1356
  key,
1357
1357
  async () => {
1358
1358
  const response = await axios2.request(requestConfig);
@@ -1458,7 +1458,7 @@ var init_QueryList = __esm({
1458
1458
  {
1459
1459
  showReset,
1460
1460
  buttonsAlign,
1461
- isConfirming: isValidating,
1461
+ isConfirming: isLoading,
1462
1462
  onReset,
1463
1463
  onConfirm,
1464
1464
  children: cloneElement(renderForm(_form), {
@@ -1482,7 +1482,7 @@ var init_QueryList = __esm({
1482
1482
  {
1483
1483
  ...tableProps,
1484
1484
  dataSource,
1485
- loading: isLoading || isValidating,
1485
+ loading: isLoading,
1486
1486
  pagination,
1487
1487
  footer: renderFooter
1488
1488
  }
@@ -2715,8 +2715,8 @@ var init_userList = __esm({
2715
2715
  url: url2,
2716
2716
  rowKey: "id",
2717
2717
  columns,
2718
- getTotal: (response) => response?.Total,
2719
- getDataSource: (response) => response?.List,
2718
+ getTotal: (data) => data?.data.Total,
2719
+ getDataSource: (data) => data?.data.List,
2720
2720
  renderForm: (form) => /* @__PURE__ */ jsx(Form, { form, children: /* @__PURE__ */ jsx(Form.Item, { label: "\u540D\u79F0", name: "name", children: /* @__PURE__ */ jsx(Input, {}) }) })
2721
2721
  }
2722
2722
  )
@@ -2999,8 +2999,8 @@ var init_roleList = __esm({
2999
2999
  columns,
3000
3000
  code: "200001",
3001
3001
  url: url3,
3002
- getTotal: (response) => response?.Total,
3003
- getDataSource: (response) => response?.List
3002
+ getTotal: (data) => data?.data.Total,
3003
+ getDataSource: (data) => data?.data.List
3004
3004
  }
3005
3005
  )
3006
3006
  }
@@ -3542,8 +3542,8 @@ var OperationLogList = () => {
3542
3542
  columns,
3543
3543
  tableLayout: "fixed",
3544
3544
  url: "/api/usystem/log/list",
3545
- getTotal: (response) => response?.Total,
3546
- getDataSource: (response) => response?.List,
3545
+ getTotal: (data) => data?.data.Total,
3546
+ getDataSource: (data) => data?.data.List,
3547
3547
  renderForm: (form) => /* @__PURE__ */ jsxs(Form, { form, layout: "inline", children: [
3548
3548
  /* @__PURE__ */ jsx(Form.Item, { label: t("global.username"), name: "uname", children: /* @__PURE__ */ jsx(Input, { allowClear: true }) }),
3549
3549
  /* @__PURE__ */ jsx(Form.Item, { label: t("global.route"), name: "route", children: /* @__PURE__ */ jsx(Input, { allowClear: true }) }),