@lemon-fe/components 0.1.95 → 0.1.97
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/es/Filter/index.js +2 -2
- package/es/Filter/typings.d.ts +3 -3
- package/package.json +2 -2
package/es/Filter/index.js
CHANGED
|
@@ -227,7 +227,7 @@ function Filter(props) {
|
|
|
227
227
|
|
|
228
228
|
var tab = {
|
|
229
229
|
title: title,
|
|
230
|
-
value: form.getFieldsValue()
|
|
230
|
+
value: _objectSpread(_objectSpread({}, value), form.getFieldsValue())
|
|
231
231
|
};
|
|
232
232
|
|
|
233
233
|
if (index >= 0) {
|
|
@@ -480,7 +480,7 @@ function Filter(props) {
|
|
|
480
480
|
style: getColStyle(item.colSpan),
|
|
481
481
|
className: className,
|
|
482
482
|
key: item.key
|
|
483
|
-
}, item.renderFormItem());
|
|
483
|
+
}, item.renderFormItem(form));
|
|
484
484
|
}
|
|
485
485
|
|
|
486
486
|
if (!item.type) {
|
package/es/Filter/typings.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { FormInstance } from 'antd';
|
|
2
2
|
import type { CSSProperties, ReactElement, ReactNode } from 'react';
|
|
3
3
|
|
|
4
|
-
export interface FilterItemType {
|
|
4
|
+
export interface FilterItemType<T = any> {
|
|
5
5
|
key: string;
|
|
6
6
|
label?: string;
|
|
7
7
|
type?: string;
|
|
8
8
|
colSpan?: number;
|
|
9
9
|
hideLabel?: boolean;
|
|
10
10
|
extraProps?: Record<string, any>;
|
|
11
|
-
renderFormItem?: () => ReactElement;
|
|
11
|
+
renderFormItem?: (form: FormInstance<T>) => ReactElement;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export interface FilterProps<T extends Record<string, any> = Record<string, any>> {
|
|
15
|
-
data: FilterItemType[];
|
|
15
|
+
data: FilterItemType<T>[];
|
|
16
16
|
defaultValue?: T;
|
|
17
17
|
value?: T;
|
|
18
18
|
onChange?: (value: T) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.97",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"author": "鲁盛杰 <lusj@cnlemon.net>",
|
|
6
6
|
"homepage": "",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"react": "^17.0.2",
|
|
40
40
|
"react-dom": "^17.0.2"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "7823b5e252d052d697f8f4c584d39ee3c2014d92"
|
|
43
43
|
}
|