rc-input-for
1.0.0 • Public • Published Input输入框
ie系列浏览器下使用模拟placeholder以及composition时间的处理
浏览器支持
 |
 |
 |
 |
 |
IE 8+ ✔ |
Chrome 31.0+ ✔ |
Firefox 31.0+ ✔ |
Opera 30.0+ ✔ |
Safari 7.0+ ✔ |
安装
$ npm install @sdp.nd/nd-input --save
何时使用
- ie系列需要模拟placeholder或者处理输入字符截断问题
如何使用
import Input from "@sdp.nd/nd-input";
<Input />;
API
参数 |
说明 |
类型 |
默认值 |
是否必填 |
onChange |
输入字符回调 |
Function(event) |
- |
false |
type |
声明 input 类型,同原生 input 标签的 type 属性。另外提供 type="textarea" |
string |
text |
false |
style |
容器节点样式 |
Object |
- |
false |
className |
输入框样式 |
string |
- |
false |
prefixCls |
组件样式类名称前缀 |
string |
'nd-input' |
false |
value |
输入框内容 |
string |
- |
false |
defaultValue |
输入框默认内容 |
string |
- |
false |
placeholder |
同元素placeholder属性 |
string |
- |
false |
本地运行
npm install
npm run start
http://localhost:8000
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads