1.0.2 • Published 5 years ago
@beisen-phoenix/mobile-inner-input v1.0.2
一个单纯的输入框 充满整个容器
API
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
value | 指定输入框当前值 | any | 无 |
defaultValue | 输入框初始值 | any | 无 |
placeholder | 输入框没有值时的帮助文字 | string | 点击填写 |
readOnly | 是否只读 | boolean | false |
type | 类型 | string |
多语言
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
translation | 语言包 用于翻译组件内置常量 | {inputHolder: string} | {inputHolder: '点击填写'} |
事件
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
onFocus | 输入框获取焦点时的回调 | (e: React.FocusEvent) => void | 无 |
onChange | 输入框内容变化时的回调 | (e: React.ChangeEvent) => void | 无 |
onBlur | 输入框失去焦点时的回调 | (e: React.FocusEvent) => void | 无 |
文字对齐
参数 | 说明 | 类型 | 默认值 |
---|---|---|---|
textAlign | 文字对齐方式 可选值为css支持的所有对齐方式 | string | right |