@cqsjjb/jjb-react-admin-component 3.1.2 → 3.1.3
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/SearchForm/index.d.ts +5 -0
- package/SearchForm/index.js +10 -4
- package/package.json +1 -1
package/SearchForm/index.d.ts
CHANGED
|
@@ -43,6 +43,11 @@ interface SearchFormProps extends ComponentProps {
|
|
|
43
43
|
* @description 重置 按钮触发
|
|
44
44
|
*/
|
|
45
45
|
onReset?: (values: { [ p: string ]: any }) => void;
|
|
46
|
+
/**
|
|
47
|
+
* @description 展开/收起事件
|
|
48
|
+
* @param open 展开/收起状态
|
|
49
|
+
*/
|
|
50
|
+
onExpand?: (open: boolean) => void;
|
|
46
51
|
}
|
|
47
52
|
|
|
48
53
|
interface SearchFormFc extends React.FC<SearchFormProps> {
|
package/SearchForm/index.js
CHANGED
|
@@ -15,7 +15,8 @@ class searchForm extends React.Component {
|
|
|
15
15
|
formLine,
|
|
16
16
|
colSize,
|
|
17
17
|
loading,
|
|
18
|
-
onReset
|
|
18
|
+
onReset,
|
|
19
|
+
onExpand
|
|
19
20
|
} = this.props;
|
|
20
21
|
return /*#__PURE__*/React.createElement(Space, null, /*#__PURE__*/React.createElement(Button, {
|
|
21
22
|
type: "primary",
|
|
@@ -35,9 +36,14 @@ class searchForm extends React.Component {
|
|
|
35
36
|
transform: this.state.isOpen ? 'rotate(-90deg)' : 'rotate(90deg)'
|
|
36
37
|
}
|
|
37
38
|
}),
|
|
38
|
-
onClick: () =>
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
onClick: () => {
|
|
40
|
+
const open = !this.state.isOpen;
|
|
41
|
+
this.setState({
|
|
42
|
+
isOpen: open
|
|
43
|
+
}, () => {
|
|
44
|
+
onExpand && onExpand(open);
|
|
45
|
+
});
|
|
46
|
+
}
|
|
41
47
|
}, this.state.isOpen ? '收起' : '展开'));
|
|
42
48
|
}
|
|
43
49
|
groupsList() {
|