-
-
Notifications
You must be signed in to change notification settings - Fork 319
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73b4007
commit fa28bdf
Showing
9 changed files
with
422 additions
and
262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { memo } from 'react'; | ||
import styles from './index.module.less'; | ||
import { Button, Form, Input, Space } from 'antd'; | ||
|
||
const SearchBar = memo((props: any) => { | ||
const { form, children, submit, reset } = props; | ||
|
||
return ( | ||
<> | ||
<div className={styles.searchBar}> | ||
<div className={styles.searchBarForm}> | ||
<Form form={form} layout="inline" initialValues={props.initialValues}> | ||
<Form.Item name="keyword" style={{ width: 350 }}> | ||
<Input placeholder="请输入搜索名称" onPressEnter={submit} /> | ||
</Form.Item> | ||
<Form.Item> | ||
<Space> | ||
<Button type="primary" onClick={submit} size="middle"> | ||
搜索 | ||
</Button> | ||
</Space> | ||
</Form.Item> | ||
</Form> | ||
</div> | ||
<div className={styles.searchBarBtns}>{children}</div> | ||
</div> | ||
</> | ||
); | ||
}); | ||
|
||
export default SearchBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.searchBar { | ||
padding: 0 10px 20px 10px; | ||
border-radius: 5px; | ||
width: 100%; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.