@fe-free/core 1.5.4 → 1.5.5

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,12 @@
1
1
  # @fe-free/core
2
2
 
3
+ ## 1.5.5
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: some
8
+ - @fe-free/tool@1.5.5
9
+
3
10
  ## 1.5.4
4
11
 
5
12
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/core",
3
- "version": "1.5.4",
3
+ "version": "1.5.5",
4
4
  "description": "",
5
5
  "main": "./src/index.ts",
6
6
  "author": "",
@@ -36,7 +36,7 @@
36
36
  "react-syntax-highlighter": "^15.5.0",
37
37
  "vanilla-jsoneditor": "^0.23.1",
38
38
  "zustand": "^4.5.4",
39
- "@fe-free/tool": "1.5.4"
39
+ "@fe-free/tool": "1.5.5"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@ant-design/pro-components": "^2.8.7",
@@ -19,6 +19,8 @@ interface ProFormListModalHelperProps<T> {
19
19
  disabledAdd?: boolean;
20
20
  // 禁用编辑
21
21
  disabledEdit?: boolean;
22
+ // 禁用删除
23
+ disabledDelete?: boolean;
22
24
  // 触发添加
23
25
  addTrigger?: JSX.Element;
24
26
  editForm?: any;
@@ -87,16 +89,18 @@ function ProFormListModalHelper<T = any>(props: ProFormListModalHelperProps<T>)
87
89
  <Button icon={<EditOutlined />} type="text" size="small" />
88
90
  </Edit>
89
91
  )}
90
- <Button
91
- icon={<DeleteOutlined />}
92
- type="text"
93
- size="small"
94
- onClick={() => {
95
- const newOptions = [...options];
96
- newOptions.splice(index, 1);
97
- props.onChange?.(newOptions);
98
- }}
99
- />
92
+ {!props.disabledDelete && (
93
+ <Button
94
+ icon={<DeleteOutlined />}
95
+ type="text"
96
+ size="small"
97
+ onClick={() => {
98
+ const newOptions = [...options];
99
+ newOptions.splice(index, 1);
100
+ props.onChange?.(newOptions);
101
+ }}
102
+ />
103
+ )}
100
104
  </div>
101
105
  )}
102
106
  </div>