1.0.0 • Published 6 years ago

rc-input-for v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Input输入框


ie系列浏览器下使用模拟placeholder以及composition时间的处理

浏览器支持

IEChromeFirefoxOperaSafari
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"stringtextfalse
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