0.0.8 • Published 5 years ago

@beisen-phoenix/mobile-text-range v0.0.8

Weekly downloads
1
License
ISC
Repository
gitlab
Last release
5 years ago

表单组件:输入区间组件。

概述

用于表单中的区间输入

API

参数说明类型默认值
labelText标题string
value输入框当前值Array
defaultValue输入框初始值Array
placeholder输入框没有值时的帮助文字string点击填写
required是否必填booleanfalse
readOnly是否只读booleanfalse
rightEl右侧区域元素 用于显示单位或者图标string/React.ReactNode
hasError当前字段验证是否出现错误 用于显示底部错误红线booleanfalse
labelIcon自定义字段图标 展示于标题右侧 大小为 16px*16pxReact.ReactNode

多语言

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

事件

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