@beisen-phoenix/mobile-base-input
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

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

API

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

样式

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

多语言

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

事件

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

Readme

Keywords

none

Package Sidebar

Install

npm i @beisen-phoenix/mobile-base-input

Weekly Downloads

1

Version

1.0.6

License

ISC

Unpacked Size

135 kB

Total Files

11

Last publish

Collaborators

  • beisencorp