bee-form-control
form-control ui component for react
Last updated 3 months ago by tinper-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install bee-form-control 
SYNC missed versions from official npm registry.

bee-form-control

npm version Build Status Coverage Status

<FormControl> 来代替 <input>, <textarea>, and <select>

安装步骤

$ git clone https://github.com/tinper-bee/bee-form-control
$ cd bee-form-control
$ npm install
$ npm run dev

使用

使用单独的bee-form-control包

组件引入

先进行下载bee-form-control包

npm install --save bee-form-control

组件调用

import FormControl from 'bee-form-control';
React.render(<div>
    <div>
        <FormControl placeholder="input placeholder" ref="test" />
    </div>
</div>, document.getElementById('target'));

样式引入

  • 可以使用link引入dist目录下bee-form-control.css
<link rel="stylesheet" href="./node_modules/build/bee-form-control.css">
  • 可以在js中import样式
import "./node_modules/src/FormControl.scss"
//或是
import "./node_modules/build/bee-form-control.css"

API

参数 说明 类型 默认值
className 类名 string -
componentClass 说明表单类型(input,textarea) string 'input'
type 类型(text,search, submit,'checkbox',...详情http://www.w3school.com.cn/html5/att_input_type.asp) string 'text'
onChange input值发生改变触发的回调 func -
onKeyDown keydown回调 func -
value input当前值 string -
defaultValue input默认值 string -
onSearch input type="search" 回车和点击搜索按钮的回调 func -
showClose 是否显示清空按钮 bool -
focusSelect 设置当focus的时候是否选择内容 bool false

Current Tags

  • 2.0.9-alpha.1                                ...           alpha (a year ago)
  • 2.0.3                                ...           beta (a year ago)
  • 2.0.24                                ...           latest (3 months ago)

73 Versions

  • 2.0.24                                ...           3 months ago
  • 2.0.23                                ...           3 months ago
  • 2.0.22                                ...           4 months ago
  • 2.0.21                                ...           5 months ago
  • 2.0.20                                ...           5 months ago
  • 2.0.19                                ...           6 months ago
  • 2.0.18                                ...           7 months ago
  • 2.0.17                                ...           7 months ago
  • 2.0.16                                ...           7 months ago
  • 2.0.15                                ...           7 months ago
  • 2.0.14                                ...           7 months ago
  • 2.0.13                                ...           7 months ago
  • 2.0.12                                ...           7 months ago
  • 2.0.11                                ...           10 months ago
  • 2.0.10                                ...           a year ago
  • 2.0.9                                ...           a year ago
  • 2.0.9-alpha.1                                ...           a year ago
  • 2.0.9-alpha.0                                ...           a year ago
  • 2.0.8                                ...           a year ago
  • 2.0.8-alpha.0                                ...           a year ago
  • 2.0.7                                ...           a year ago
  • 2.0.7-alpha.1                                ...           a year ago
  • 2.0.7-alpha.0                                ...           a year ago
  • 2.0.6                                ...           a year ago
  • 2.0.5                                ...           a year ago
  • 2.0.4                                ...           a year ago
  • 2.0.3                                ...           a year ago
  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.1.11                                ...           2 years ago
  • 1.1.10                                ...           2 years ago
  • 1.1.9                                ...           2 years ago
  • 1.1.8                                ...           2 years ago
  • 1.1.7                                ...           2 years ago
  • 1.1.6                                ...           2 years ago
  • 1.1.5                                ...           2 years ago
  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.10                                ...           2 years ago
  • 1.0.9                                ...           2 years ago
  • 1.0.8                                ...           3 years ago
  • 1.0.7                                ...           3 years ago
  • 1.0.6                                ...           3 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 0.1.23                                ...           3 years ago
  • 0.1.22                                ...           3 years ago
  • 0.1.21                                ...           3 years ago
  • 0.1.20                                ...           3 years ago
  • 0.1.9                                ...           3 years ago
  • 0.1.8                                ...           4 years ago
  • 0.1.7                                ...           4 years ago
  • 0.1.6                                ...           4 years ago
  • 0.1.5                                ...           4 years ago
  • 0.1.4                                ...           4 years ago
  • 0.1.3                                ...           4 years ago
  • 0.1.2                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
  • 0.0.7                                ...           4 years ago
  • 0.0.6                                ...           4 years ago
  • 0.0.5                                ...           4 years ago
  • 0.0.4                                ...           4 years ago
  • 0.0.3                                ...           4 years ago
  • 0.0.2                                ...           4 years ago
  • 0.0.1                                ...           4 years ago

Copyright 2014 - 2016 © taobao.org |