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.8 to 0.4.9

8

lib/index.js

@@ -7,3 +7,2 @@ /** @jsx createElement */

*
* @providesModule rx-Button
*/

@@ -288,3 +287,3 @@ 'use strict';

_nukeView2.default,
_extends({ x: 'input-wrap', style: inputWrapperStyle }, classNameForBorder),
_extends({}, others, { x: 'input-wrap', style: inputWrapperStyle }, classNameForBorder),
(0, _rax.createElement)(

@@ -496,7 +495,3 @@ _nukeView2.default,

value: function blurHandler(e) {
//避免focus为false后, clear的button被隐藏的这种情况发生
//input的blur会在clear的click事件前触发
// clearTimeout(this.timer);
// this.timer = setTimeout(() => {
this.setState({

@@ -507,3 +502,2 @@ focus: false

this.trigger('onBlur', e);
// }, 10);
}

@@ -510,0 +504,0 @@ }, {

2

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

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

/** @jsx createElement */
import {createElement, Component,findDOMNode,render } from 'rax';
import { View, Text} from 'nuke-components';
import { createElement, Component, findDOMNode, render } from 'rax';
import View from 'nuke-view';
import Text from 'nuke-text';
import Input from 'nuke-input';

@@ -13,11 +14,11 @@ import Button from 'nuke-button';

this.state = {
content:'',
inputStr:''
content: '',
inputStr: ''
}
}
change = (value, e)=>{
}
change = (value, e) => {
this.setState({
content: value
})
})
}

@@ -30,5 +31,5 @@

<View style={styles.lineWithMargin}>
<Input ref="myinput" defaultValue="春装 连衣裙" onChange={this.change} onInput={(e)=>{console.log('input==>',value)}} />
<Input ref="myinput" defaultValue="春装 连衣裙" onChange={this.change} onInput={(e) => { console.log('input==>', value) }} />
</View>
<View style={[styles.lineWithMargin,styles.textLine]}>
<View style={[styles.lineWithMargin, styles.textLine]}>
<Text style={styles.text}>用户输入:{this.state.content}</Text>

@@ -39,13 +40,13 @@ </View>

<View style={styles.lineWithMargin}>
<Input onInput={(e)=>{console.log('input==>',value)}} maxLength={10}/>
<Input onInput={(e) => { console.log('input==>', value) }} maxLength={10} />
</View>
<Page.Intro main="多行"></Page.Intro>
<View style={styles.lineWithMargin}>
<Input style={{height:'300rem',marginBottom:'20rem'}} multiple={true} placeholder="介绍一下" onFocus={(e) => console.log('onFocus',e)} onBlur={(e) => console.log('onBlur',e)} />
<Input style={{ height: '300rem', marginBottom: '20rem' }} multiple={true} placeholder="介绍一下" onFocus={(e) => console.log('onFocus', e)} onBlur={(e) => console.log('onBlur', e)} />
</View>
<Page.Intro main="不可修改"></Page.Intro>
<View style={[styles.lineWithMargin,{marginBottom:'10rem'}]}><Input disabled value="不可修改"/></View>
<Page.Intro main="不可修改"></Page.Intro>
<View style={[styles.lineWithMargin, { marginBottom: '10rem' }]}><Input disabled value="不可修改" /></View>
<Page.Intro main="键盘类型" sub="密码"></Page.Intro>

@@ -65,19 +66,19 @@ <View style={styles.lineWithMargin}><Input placeholder="password" htmlType="password" /></View>

<View style={styles.lineWithMargin}>
<Input
style={styles.input}
encrypt={true}
encryptFormat={2}
encryptSeckeyType={1}
onChange={(value,e) => this.setState({inputStr:value})}
value={'~tz4VOxQS0HdJn2Yo1nEwaw==~1~'}>
</Input>
<Text style={styles.inputStr}
encrypt={true}
encryptFormat={2}
encryptSeckeyType={1}>
{this.state.inputStr}
</Text>
<Text style={styles.inputStr}>
{this.state.inputStr}
</Text>
<Input
style={styles.input}
encrypt={true}
encryptFormat={2}
encryptSeckeyType={1}
onChange={(value, e) => this.setState({ inputStr: value })}
value={'~tz4VOxQS0HdJn2Yo1nEwaw==~1~'}>
</Input>
<Text style={styles.inputStr}
encrypt={true}
encryptFormat={2}
encryptSeckeyType={1}>
{this.state.inputStr}
</Text>
<Text style={styles.inputStr}>
{this.state.inputStr}
</Text>
</View>

@@ -90,14 +91,14 @@

}
const styles={
lineWithMargin:{
marginLeft:'30rem',
marginRight:'30rem',
const styles = {
lineWithMargin: {
marginLeft: '30rem',
marginRight: '30rem',
},
textLine:{
marginTop:'20rem',
marginBottom:'40rem',
textLine: {
marginTop: '20rem',
marginBottom: '40rem',
},
text:{
fontSize:'26rem'
text: {
fontSize: '26rem'
},

@@ -109,4 +110,4 @@ inputStr: {

},
}
render(<App/>);
render(<App />);
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