@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fe-free/core",
|
|
3
|
-
"version": "1.5.
|
|
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.
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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>
|