import React, {FC} from 'react' import {Image, Text, View, Input} from "@tarojs/components"; import './index.scss'; import {InputProps} from "@tarojs/components/types/Input"; interface IProps { className?: string, thumb?: string; title: string|JSX.Element, extraMultiline?: boolean; required?: boolean, note?: string, arrow?: 'up' | 'down' | 'right', hasBorder?: boolean; value: string; onChangeText: (text: string)=>void; placeholder?: string; inputProps?: Partial; } const YZListItem: FC = ({className, title, thumb, extraMultiline, value, onChangeText, placeholder, inputProps, note, required, arrow, hasBorder = true})=>{ return ( {thumb && ( )} {title} {note && {note}} { onChangeText && onChangeText(e.detail.value); return e.detail.value; }} {...(inputProps||{})} /> ); } YZListItem.defaultProps = { //默认支持多行 extraMultiline: true, placeholder: '请输入' }; export default React.memo(YZListItem);