@ecoding/components.antd 0.3.39 → 0.3.41

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.
@@ -42,6 +42,14 @@ const FiltersHorizontal = ({ items, onFinish, onClear, y, setY, overMax, colOpts
42
42
  const colProps = colOpts ? colOpts : { span: 6 };
43
43
  return colProps;
44
44
  }, [colOpts]);
45
+ const isOpShowAfter = useMemo(() => {
46
+ const len = items.length;
47
+ const temp = Math.floor(24 / colProps.span);
48
+ if (len < temp) {
49
+ return true;
50
+ }
51
+ return false;
52
+ }, []);
45
53
  useEffect(() => {
46
54
  if (ref.current) {
47
55
  if (items && items.length > overMax) {
@@ -57,13 +65,25 @@ const FiltersHorizontal = ({ items, onFinish, onClear, y, setY, overMax, colOpts
57
65
  }, [y]);
58
66
  return (React.createElement(Form, { form: form, onFinish: finish, style: { width: '100%', position: "relative" } },
59
67
  React.createElement("div", { style: { display: "flex" } },
60
- React.createElement(Row, { gutter: 20, style: { overflow: "hidden", width: '100%', height: Number(wrapH) > 0 ? wrapH : 'auto' }, ref: ref }, items && items.map((item) => {
61
- return (React.createElement(Col, Object.assign({}, colProps), item));
62
- })),
63
- React.createElement(Space, { direction: "vertical", size: "small", style: { textAlign: "right", width: 90 } },
68
+ React.createElement(Row, { gutter: 20, style: { overflow: "hidden", width: '100%', height: Number(wrapH) > 0 ? wrapH : 'auto' }, ref: ref },
69
+ items && items.map((item) => {
70
+ return (React.createElement(Col, Object.assign({}, colProps), item));
71
+ }),
72
+ isOpShowAfter ? (React.createElement(Col, Object.assign({}, colProps, { style: { paddingTop: 4 } }),
73
+ React.createElement(Button, { type: "primary", className: 'mr10', size: 'small', htmlType: "submit" }, "\u641C\u7D22"),
74
+ React.createElement(Button, { size: 'small', onClick: clear }, "\u6E05\u7A7A"))) : null),
75
+ !isOpShowAfter ? (React.createElement(Space, { direction: "vertical", size: "small", style: { textAlign: "right", width: 90 } },
64
76
  React.createElement(Button, { type: "primary", size: 'small', htmlType: "submit" }, "\u641C\u7D22"),
65
- React.createElement(Button, { size: 'small', onClick: clear }, "\u6E05\u7A7A"))),
66
- showMore ? (React.createElement(Button, { type: 'link', onClick: switchShow, style: { fontSize: 12, position: "absolute", bottom: -10, left: '50%', transform: "translateX(-50%)" }, size: 'small' }, moreFlag ? "收起" : "展开更多")) : null));
77
+ 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
+ } })));
67
87
  };
68
88
  FiltersHorizontal.defaultProps = {
69
89
  items: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/components.antd",
3
- "version": "0.3.39",
3
+ "version": "0.3.41",
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": "85e72aba0357ed01704cb1a1e73356415e0f85aa"
46
+ "gitHead": "579781847632dbd4b54cb6a401c12df15d05893b"
47
47
  }