@fe-free/core 1.4.3 → 1.4.4
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 +7 -0
- package/package.json +2 -2
- package/src/crud/types.tsx +7 -7
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fe-free/core",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"author": "",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-syntax-highlighter": "^15.5.0",
|
|
36
36
|
"vanilla-jsoneditor": "^0.23.1",
|
|
37
37
|
"zustand": "^4.5.4",
|
|
38
|
-
"@fe-free/tool": "1.4.
|
|
38
|
+
"@fe-free/tool": "1.4.4"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"@ant-design/pro-components": "^2.8.7",
|
package/src/crud/types.tsx
CHANGED
|
@@ -25,7 +25,7 @@ interface CRUDProps<DataSource = any, Key = string> {
|
|
|
25
25
|
// *** Create 新建 ***
|
|
26
26
|
|
|
27
27
|
/** 新增接口 */
|
|
28
|
-
requestCreateByValues?: (values: Partial<DataSource>) => Promise<
|
|
28
|
+
requestCreateByValues?: (values: Partial<DataSource>) => Promise<false | void>;
|
|
29
29
|
/** 新建按钮,默认新建 */
|
|
30
30
|
createButton?: ReactNode;
|
|
31
31
|
/** create 更多设置 */
|
|
@@ -54,7 +54,7 @@ interface CRUDProps<DataSource = any, Key = string> {
|
|
|
54
54
|
// *** Read 详情 ***
|
|
55
55
|
|
|
56
56
|
/** 获取详情接口 */
|
|
57
|
-
requestGetByRecord?: (record: DataSource) => Promise<
|
|
57
|
+
requestGetByRecord?: (record: DataSource) => Promise<DataSource>;
|
|
58
58
|
/** 跳转到详情的索引 ,默认 id */
|
|
59
59
|
detailIdIndex?: string;
|
|
60
60
|
/** read 更多设置 */
|
|
@@ -71,10 +71,10 @@ interface CRUDProps<DataSource = any, Key = string> {
|
|
|
71
71
|
|
|
72
72
|
// *** Update 更新 ***
|
|
73
73
|
|
|
74
|
-
/**
|
|
75
|
-
requestUpdateByValues?: (values: Partial<DataSource>) => Promise<
|
|
74
|
+
/** 更新接口,返回 false 则不关闭弹窗 */
|
|
75
|
+
requestUpdateByValues?: (values: Partial<DataSource>) => Promise<false | void>;
|
|
76
76
|
/** @deprecated 请使用 requestUpdateByValues 替代 */
|
|
77
|
-
requestUpdateById?: (values: Partial<DataSource>) => Promise<
|
|
77
|
+
requestUpdateById?: (values: Partial<DataSource>) => Promise<false | void>;
|
|
78
78
|
updateProps?: {
|
|
79
79
|
/** 文本 */
|
|
80
80
|
operateText?: string;
|
|
@@ -89,7 +89,7 @@ interface CRUDProps<DataSource = any, Key = string> {
|
|
|
89
89
|
// *** Delete 删除 ***
|
|
90
90
|
|
|
91
91
|
/** 删除接口 */
|
|
92
|
-
requestDeleteByRecord?: (record: DataSource) => Promise<
|
|
92
|
+
requestDeleteByRecord?: (record: DataSource) => Promise<void>;
|
|
93
93
|
/** 删除相关 */
|
|
94
94
|
deleteProps?: {
|
|
95
95
|
/** 显示名称索引 */
|
|
@@ -112,7 +112,7 @@ interface CRUDProps<DataSource = any, Key = string> {
|
|
|
112
112
|
onClick: (
|
|
113
113
|
event: React.MouseEvent<HTMLElement>,
|
|
114
114
|
options: { selectedRowKeys: Key[]; selectedRows: DataSource[] },
|
|
115
|
-
) => Promise<
|
|
115
|
+
) => Promise<void>;
|
|
116
116
|
}[];
|
|
117
117
|
}
|
|
118
118
|
|