Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

RXReactNative/react-native-rxinput

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

28 Commits

Repository files navigation

RXInput

Getting started

$ npm install react-native-rxinput --save

Usage

import RXTextInput, {RXNumberUtil} from 'react-native-rxinput'
// render
<RXTextInput
 type={'float'}
 enable={false}
 maxLength={5}
 onChangeText={(text) => {
 //...
 }
 //...TextInput.props
/>



根据 React-NativeTextInput 控制和过滤掉文本。

Props

  • ...TextInput.props
  • type
  • enable
  • valueSize


Reference


type

类型 说明 默认
text 空(默认键盘) true
number 数字键盘
int 数字键盘 - 整型
float 数字键盘 - 浮点型(最多保留2位小数)
amount 金额 (8位数字 + 格式化)
phone 手机 (11位数字 + 格式化)
bankCard 银行卡 (19位数字 + 格式化)
VIN 车架号 (17位字母+数字)
idCardNo 身份证 (18位)
email 邮箱
captcha 验证码 (6位数字)
graphCaptcha 校验图形验证码 (4位数字)
password 输入的文本加密

enable

如果为false,文本框是不可编辑的。默认值为true。(等同于 editable)


valueSize

输入的文本字体大小。

AltStyle によって変換されたページ (->オリジナル) /