parent
be402c557b
commit
f8703c0754
@ -1,21 +1,19 @@ |
||||
import {FC} from "react"; |
||||
import {Input, View} from "@tarojs/components"; |
||||
import {View} from "@tarojs/components"; |
||||
import styles from "../home.module.scss"; |
||||
import Icon from "@/components/icon"; |
||||
import Taro from "@tarojs/taro"; |
||||
|
||||
interface Props { |
||||
onConfirm: (value: string) => void |
||||
} |
||||
|
||||
export const Search: FC<Props> = (props) => { |
||||
export const Search: FC = () => { |
||||
|
||||
function jump(){ |
||||
Taro.navigateTo({url:'/pages/preview/search/search/index'}) |
||||
} |
||||
return ( |
||||
<View className={styles.search}> |
||||
<View className={styles.search} onClick={jump}> |
||||
<Icon name='search' size={18} color='#808080'/> |
||||
<Input |
||||
placeholder='搜索疾病名称' |
||||
confirmType='search' |
||||
onConfirm={(e) => props.onConfirm((e.target as any).value!)} |
||||
className='flex-1 pl-1'/> |
||||
<View className='ml-1'>搜索课程</View> |
||||
</View> |
||||
) |
||||
} |
||||
|
Loading…
Reference in new issue