@lemon-fe/components 0.1.95 → 0.1.100
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.
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@import '../theme.less';
|
|
2
|
-
|
|
3
1
|
.@{prefixCls}-form-item {
|
|
4
2
|
display: flex;
|
|
5
3
|
align-items: center;
|
|
@@ -16,4 +14,10 @@
|
|
|
16
14
|
padding: 6px 6px 6px 0;
|
|
17
15
|
cursor: pointer;
|
|
18
16
|
}
|
|
17
|
+
|
|
18
|
+
.ant-table-cell-row-hover &:not(.ant-input) {
|
|
19
|
+
background-color: #fff;
|
|
20
|
+
border: 1px solid #c0c0c0;
|
|
21
|
+
border-radius: 4px;
|
|
22
|
+
}
|
|
19
23
|
}
|
|
@@ -70,7 +70,10 @@ export type EditableTableRowError = {
|
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
export interface EditableTableProps<T>
|
|
73
|
-
extends Pick<
|
|
73
|
+
extends Pick<
|
|
74
|
+
BaseTableProps<T>,
|
|
75
|
+
'rowKey' | 'virtual' | 'scroll' | 'pagination' | 'loading' | 'summaryRecord' | 'summaryTitle'
|
|
76
|
+
> {
|
|
74
77
|
editable?: boolean;
|
|
75
78
|
value?: T[];
|
|
76
79
|
error?: string | EditableTableRowError[];
|
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) {
|
|
@@ -592,30 +592,30 @@ function Filter(props) {
|
|
|
592
592
|
transform: 'rotate(180deg)'
|
|
593
593
|
} : undefined
|
|
594
594
|
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("path", {
|
|
595
|
-
id: "
|
|
595
|
+
id: "filter-down",
|
|
596
596
|
d: "M0 0h10v10H0z"
|
|
597
597
|
})), /*#__PURE__*/React.createElement("g", {
|
|
598
598
|
transform: "matrix(1 0 0 -1 0 10)",
|
|
599
599
|
fill: "none",
|
|
600
600
|
fillRule: "evenodd"
|
|
601
601
|
}, /*#__PURE__*/React.createElement("mask", {
|
|
602
|
-
id: "
|
|
602
|
+
id: "filter-down-mask",
|
|
603
603
|
fill: "#fff"
|
|
604
604
|
}, /*#__PURE__*/React.createElement("use", {
|
|
605
|
-
xlinkHref: "#
|
|
605
|
+
xlinkHref: "#filter-down",
|
|
606
606
|
transform: "rotate(-90 5 5)"
|
|
607
607
|
})), /*#__PURE__*/React.createElement("use", {
|
|
608
608
|
fillOpacity: "0",
|
|
609
609
|
fill: "#C4C4C4",
|
|
610
610
|
transform: "rotate(-90 5 5)",
|
|
611
|
-
xlinkHref: "#
|
|
611
|
+
xlinkHref: "#filter-down"
|
|
612
612
|
}), /*#__PURE__*/React.createElement("path", {
|
|
613
613
|
d: "M2.172 1.757 5 4.586l2.828-2.829M2.172 5.757 5 8.586l2.828-2.829",
|
|
614
614
|
stroke: "currentColor",
|
|
615
615
|
strokeLinecap: "round",
|
|
616
616
|
strokeLinejoin: "round",
|
|
617
617
|
strokeDasharray: "0,0",
|
|
618
|
-
mask: "url(#
|
|
618
|
+
mask: "url(#filter-down-mask)"
|
|
619
619
|
}))))))))));
|
|
620
620
|
}
|
|
621
621
|
|
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.100",
|
|
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": "5f53ecae92b68b912baebcad654b448b93973526"
|
|
43
43
|
}
|