import { Input, InputProps } from '@tarojs/components'; import './index.less'; interface IProps extends InputProps { rightText?: string; maxLengthTips?: boolean; } const PREFIX = 'bl-form-input'; function BlFormInput(props: IProps) { const { value, maxlength = 140, maxLengthTips, rightText, onInput, ...otherProps } = props; return (
{rightText &&
{rightText}
} {maxLengthTips && maxlength && (
{`${(value || '').length}/${maxlength}`}
)}
); } export default BlFormInput;