hc-react-keyboard-car

1.0.6 • Public • Published

车牌号码键盘

根据组件 CarnoKeyboard 修改而来,优化一些细节

效果如下:

Install

npm install hc-react-keyboard-car

Usage

hc-react-keyboard-car组件用法

    import CarKeyboard from 'hc-react-keyboard-car'

    <CarKeyboard
        isOpen={this.state.isOpen}
        onPress={this.onPress}
        onBlur={this.onBlur}
        level1={keyboardText.level1}
        level2={keyboardText.level2}
        length={7}
        done={this.done}
    />
    // 具体用法请见example

props

level1

React.PropTypes.string.isRequired

省份缩写的键盘。

level2

React.PropTypes.string.isRequired

车牌号后6位的键盘。

isOpen

React.PropTypes.bool.isRequired

键盘打开状态,默认是false。

onPress

React.PropTypes.func.isRequired

点击键盘的时候执行的回调函数。

done

React.PropTypes.func.isRequired

输入完之后的时候执行的回调函数。

onBlur

React.PropTypes.func.isRequired

键盘失去焦点的时候执行的回调函数。

length

React.PropTypes.number

自定义车牌号长度,用来兼容新能源车牌号(8位),默认长度7。

Readme

Keywords

Package Sidebar

Install

npm i hc-react-keyboard-car

Weekly Downloads

2

Version

1.0.6

License

MIT

Unpacked Size

23.8 kB

Total Files

5

Last publish

Collaborators

  • feng_jj
  • gzhc_gaojie
  • wangchun_020
  • yuechen195
  • liuzhe529
  • haici-fe
  • programmer-yang