import { SearchBar } from "@nutui/nutui-react-taro"; import { View, Text, Image } from "@tarojs/components"; import img from "../../config/images"; import styles from "./index.module.scss"; interface IProps { handleFilterIcon: () => void; isSelect: boolean; filterCount: number; onChange: (value: string) => void; } const SearchBarComponent = (props: IProps) => { const { handleFilterIcon, isSelect, filterCount, onChange } = props; const handleChange = (value: string) => { onChange && onChange(value); }; return ( <> } right={ {isSelect && ( {filterCount} )} } className={styles.searchBar} placeholder="搜索上海的球局和场地" onChange={handleChange} /> ); }; export default SearchBarComponent;