@fe-free/core 6.0.14 → 6.0.16

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,20 @@
1
1
  # @fe-free/core
2
2
 
3
+ ## 6.0.16
4
+
5
+ ### Patch Changes
6
+
7
+ - fix bug
8
+ - @fe-free/icons@6.0.16
9
+ - @fe-free/tool@6.0.16
10
+
11
+ ## 6.0.15
12
+
13
+ ### Patch Changes
14
+
15
+ - @fe-free/icons@6.0.15
16
+ - @fe-free/tool@6.0.15
17
+
3
18
  ## 6.0.14
4
19
 
5
20
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/core",
3
- "version": "6.0.14",
3
+ "version": "6.0.16",
4
4
  "description": "React 业务核心组件库:CRUD、ProForm 扩展、布局、路由、树、上传等(Antd + ProComponents)",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -43,8 +43,8 @@
43
43
  "i18next-icu": "^2.4.1",
44
44
  "react": "^19.2.0",
45
45
  "react-i18next": "^16.4.0",
46
- "@fe-free/icons": "6.0.14",
47
- "@fe-free/tool": "6.0.14"
46
+ "@fe-free/icons": "6.0.16",
47
+ "@fe-free/tool": "6.0.16"
48
48
  },
49
49
  "scripts": {
50
50
  "i18n-extract": "rm -rf ./src/locales/zh-CN && npx i18next-cli extract"
@@ -4,6 +4,7 @@ import classNames from 'classnames';
4
4
  import { isString } from 'lodash-es';
5
5
  import { useCallback, useMemo, useState } from 'react';
6
6
  import { useTranslation } from 'react-i18next';
7
+
7
8
  import type { CRUDProps } from './types';
8
9
 
9
10
  /**
@@ -121,15 +122,27 @@ function CRUDDetail(props: CRUDDetailProps) {
121
122
 
122
123
  const handleOpenChange = useCallback(
123
124
  async (open) => {
125
+ // pro-components 有 bug,handleOpenChange 会重复调用,导致调用多次。
126
+
127
+ let isSame = false;
128
+ setIsOpen((v) => {
129
+ if (open === v) {
130
+ isSame = true;
131
+ }
132
+
133
+ return open;
134
+ });
135
+ if (isSame) {
136
+ return;
137
+ }
138
+
124
139
  if (!open) {
125
140
  // 关闭重置
126
141
  form?.resetFields();
127
- setIsOpen(open);
142
+
128
143
  return;
129
144
  }
130
145
 
131
- setIsOpen(open);
132
-
133
146
  if (id) {
134
147
  setLoading(true);
135
148