feat: first commit

This commit is contained in:
eleanor.mao
2025-03-31 22:34:22 +08:00
commit d25187c9c8
390 changed files with 57031 additions and 0 deletions

View File

@ -0,0 +1,35 @@
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 (
<div className={PREFIX}>
<Input
value={value}
maxlength={maxlength}
confirmType="done"
placeholder="请输入"
onInput={onInput}
className={`${PREFIX}__input`}
placeholderClass={`${PREFIX}__input-placeholder`}
{...otherProps}
/>
{rightText && <div className={`${PREFIX}__right-text`}>{rightText}</div>}
{maxLengthTips && maxlength && (
<div className={`${PREFIX}__max-length-tips`}>{`${(value || '').length}/${maxlength}`}</div>
)}
</div>
);
}
export default BlFormInput;