react-toolkits 2.14.4 → 2.14.6

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.14.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 72304a9: fix(operationLogList): 修复数据获取时可能存在的未定义错误
8
+
9
+ ## 2.14.5
10
+
11
+ ### Patch Changes
12
+
13
+ - ff73a74: refactor(Interceptors): 将拦截器清理逻辑移出useEffect
14
+
3
15
  ## 2.14.4
4
16
 
5
17
  ### Patch Changes
package/lib/index.js CHANGED
@@ -370,7 +370,7 @@ var init_signIn = __esm({
370
370
  signIn_default = SignIn;
371
371
  }
372
372
  });
373
- var Interceptors, Interceptors_default;
373
+ var requestInterceptorId, responseInterceptorId, Interceptors, Interceptors_default;
374
374
  var init_Interceptors = __esm({
375
375
  "src/components/interceptors/Interceptors.tsx"() {
376
376
  init_constants();
@@ -383,8 +383,8 @@ var init_Interceptors = __esm({
383
383
  );
384
384
  const { setUnregistered } = useSignInStore();
385
385
  const navigate = useNavigate();
386
- let requestInterceptorId;
387
- let responseInterceptorId;
386
+ axios2.interceptors.request.eject(requestInterceptorId);
387
+ axios2.interceptors.response.eject(responseInterceptorId);
388
388
  if (interceptors?.request) {
389
389
  requestInterceptorId = axios2.interceptors.request.use(...interceptors.request);
390
390
  } else {
@@ -461,12 +461,6 @@ var init_Interceptors = __esm({
461
461
  }
462
462
  );
463
463
  }
464
- useEffect(() => {
465
- return () => {
466
- axios2.interceptors.request.eject(requestInterceptorId);
467
- axios2.interceptors.response.eject(responseInterceptorId);
468
- };
469
- }, []);
470
464
  return children;
471
465
  };
472
466
  Interceptors_default = Interceptors;
@@ -3567,8 +3561,8 @@ var OperationLogList = () => {
3567
3561
  columns,
3568
3562
  tableLayout: "fixed",
3569
3563
  url: "/api/usystem/log/list",
3570
- getTotal: (data) => data?.data.Total,
3571
- getDataSource: (data) => data?.data.List,
3564
+ getTotal: (data) => data?.data?.Total,
3565
+ getDataSource: (data) => data?.data?.List,
3572
3566
  renderForm: (form) => /* @__PURE__ */ jsxs(Form, { form, layout: "inline", children: [
3573
3567
  /* @__PURE__ */ jsx(Form.Item, { label: t("global.username"), name: "uname", children: /* @__PURE__ */ jsx(Input, { allowClear: true }) }),
3574
3568
  /* @__PURE__ */ jsx(Form.Item, { label: t("global.route"), name: "route", children: /* @__PURE__ */ jsx(Input, { allowClear: true }) }),