Socket
Socket
Sign inDemoInstall

nuke-input

Package Overview
Dependencies
Maintainers
3
Versions
185
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-input - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

4

HISTORY.md
# Changelog
## 0.4.1 / 2017-05-24
* [[bd34b9f](http://gitlab.alibaba-inc.com/nuke/input/commit/bd34b9fbcd2e185c7ecd238c6cb341ea065ebc21)] - `docs` update readme
## 0.4.0 / 2017-05-24

@@ -5,0 +9,0 @@

2

package.json
{
"name": "nuke-input",
"version": "0.4.0",
"version": "0.4.1",
"description": "输入框",

@@ -5,0 +5,0 @@ "main": "lib/index",

@@ -5,7 +5,6 @@

- category: UI
- chinese: 带UI的输入框
- chinese: 输入框
- type: UI组件
---
**注意** 此 Input 自带了一些UI样式,如果你希望自己封装样式,可以使用TextInput组件。

@@ -17,8 +16,9 @@

| :------------- | :------------- |:------------- |:------------- |
| type | 类型,可选为enclosed(有边线)/inset(空白) | string | enclosed |
| type | 键盘类型,可选 `text` `url` `password` `tel` `date` `time` `email`| string|`text`|
| autoFocus | 自动获得焦点| boolean|false |
| maxLength | 最大长度 | number | undefined |
| multiple | 是否为多行,不选则为单行 | bool | false |
| state | 状态,可选为`''/success/error/warning` | string | '' |
| value | 当前的value 值 | string | |
| defaultValue| 初始化的value 值(**非受控用法**) | string | |
| disabled | 状态 设置文本域禁用状态 | boolean | false |
|defaultValue| 初始化的value 值(**非受控用法**) | string | |
| onInput | 输入事件 | `function` | false |

@@ -28,6 +28,2 @@ | onFocus | Focus事件 | `function` | false |

| onChange | change| `function(value, e)` | |
| maxLength | 最大长度 | number | undefined |
| hasLimitHint | 是否显示最大长度的提示, 仅对multiple有效 | boolean | false |
| htmlType | 键盘类型,可选 `text` `url` `password` `tel` `date` `time` `email`| string|`text`
| autoFocus | 自动获得焦点| boolean|false
| focus 实例方法| 让input获得焦点|`function`| |

@@ -51,9 +47,9 @@ | blur 实例方法| 让input失去焦点|`function`| |

//在某些情况下需要让 myinput 强制失去焦点
focus=(e)=>{
focus = (e) => {
this.refs.myinput.focus();
}
blur = (e)=>{
blur = (e) => {
this.refs.myinput.blur();
}
change=(value,e)=>{
change = (value,e) => {
console.log(value);//强制失去焦点后,会触发 onCchange

@@ -60,0 +56,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc