1.0.6 • Published 4 years ago

@beisen-phoenix/mobile-base-input v1.0.6

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
4 years ago

基本输入框 通栏输入、全边框输入

API

参数说明类型默认值
value指定输入框当前值any
defaultValue输入框初始值any
placeholder输入框没有值时的帮助文字string点击填写
readOnly是否只读booleanfalse
hasError当前字段验证是否出现错误 用于显示底部错误红线booleanfalse
icon自定义字段图标 展示于输入框右侧 大小为 16px*16pxReact.ReactNode
type类型string

样式

参数说明类型默认值
fullBorder全边框true/通栏输入框false 默认为通栏输入框booleanfalse
textAlign文字对齐方式 可选值为css支持的所有对齐方式stringright

多语言

参数说明类型默认值
translation语言包 用于翻译组件内置常量{inputHolder: string}{inputHolder: '点击填写'}

事件

参数说明类型默认值
onFocus输入框获取焦点时的回调(e: React.FocusEvent) => void
onChange输入框内容变化时的回调(value: string) => void
onBlur输入框失去焦点时的回调(e: React.FocusEvent) => void