@ecoding/components.antd 0.3.46 → 0.3.47
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.
|
@@ -50,6 +50,14 @@ const FiltersHorizontal = ({ items, onFinish, onClear, y, setY, overMax, colOpts
|
|
|
50
50
|
}
|
|
51
51
|
return false;
|
|
52
52
|
}, []);
|
|
53
|
+
const isLineAfter = useMemo(() => {
|
|
54
|
+
const len = items.length;
|
|
55
|
+
const temp = Math.floor(24 / colProps.span);
|
|
56
|
+
if (len == temp) {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
return false;
|
|
60
|
+
}, []);
|
|
53
61
|
useEffect(() => {
|
|
54
62
|
if (ref.current) {
|
|
55
63
|
if (items && items.length > overMax) {
|
|
@@ -64,7 +72,7 @@ const FiltersHorizontal = ({ items, onFinish, onClear, y, setY, overMax, colOpts
|
|
|
64
72
|
}
|
|
65
73
|
}, [y]);
|
|
66
74
|
return (React.createElement(Form, { form: form, onFinish: finish, style: { width: '100%', position: "relative" } },
|
|
67
|
-
React.createElement("div", { style: { display: "flex" } },
|
|
75
|
+
React.createElement("div", { style: { display: "flex", justifyContent: "space-around", alignItems: "flex-start" } },
|
|
68
76
|
React.createElement(Row, { gutter: 20, style: { overflow: "hidden", width: '100%', height: Number(wrapH) > 0 ? wrapH : 'auto' }, ref: ref },
|
|
69
77
|
items && items.map((item) => {
|
|
70
78
|
return (React.createElement(Col, Object.assign({}, colProps), item));
|
|
@@ -72,18 +80,10 @@ const FiltersHorizontal = ({ items, onFinish, onClear, y, setY, overMax, colOpts
|
|
|
72
80
|
isOpShowAfter ? (React.createElement(Col, Object.assign({}, colProps, { style: { paddingTop: 4 } }),
|
|
73
81
|
React.createElement(Button, { type: "primary", className: 'mr10', size: 'small', htmlType: "submit" }, "\u641C\u7D22"),
|
|
74
82
|
React.createElement(Button, { size: 'small', onClick: clear }, "\u6E05\u7A7A"))) : null),
|
|
75
|
-
!isOpShowAfter ? (React.createElement(Space, {
|
|
83
|
+
!isOpShowAfter ? (React.createElement(Space, { size: "small", direction: isLineAfter ? undefined : "vertical", style: Object.assign({ width: 90, textAlign: "right" }, isLineAfter ? { width: 130, margin: "4px 0 0 12px" } : {}) },
|
|
76
84
|
React.createElement(Button, { type: "primary", size: 'small', htmlType: "submit" }, "\u641C\u7D22"),
|
|
77
85
|
React.createElement(Button, { size: 'small', onClick: clear }, "\u6E05\u7A7A"))) : null),
|
|
78
|
-
showMore ? (React.createElement(Button, { type: 'link', onClick: switchShow, style: { fontSize: 12, position: "absolute", bottom: -10, left: '50%', transform: "translateX(-50%)" }, size: 'small' }, moreFlag ? "收起" : "展开更多")) : null
|
|
79
|
-
React.createElement("span", { style: {
|
|
80
|
-
position: "absolute",
|
|
81
|
-
height: 0,
|
|
82
|
-
width: "100%",
|
|
83
|
-
left: 0,
|
|
84
|
-
borderBottom: "1px dashed #efefef",
|
|
85
|
-
bottom: 4
|
|
86
|
-
} })));
|
|
86
|
+
showMore ? (React.createElement(Button, { type: 'link', onClick: switchShow, style: { fontSize: 12, position: "absolute", bottom: -10, left: '50%', transform: "translateX(-50%)" }, size: 'small' }, moreFlag ? "收起" : "展开更多")) : null));
|
|
87
87
|
};
|
|
88
88
|
FiltersHorizontal.defaultProps = {
|
|
89
89
|
items: [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecoding/components.antd",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.47",
|
|
4
4
|
"author": "cxc",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"antd": "^5.8.4",
|
|
44
44
|
"axios": "^1.1.2"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "6ce14e373f7797fad2c5fed0a1232882a94579ff"
|
|
47
47
|
}
|