Comparing version 0.7.9 to 0.7.10
@@ -1,50 +0,51 @@ | ||
import React from "react"; | ||
import FixedContent from "fengui/component/page/FixedContent"; | ||
import styles from "./Input.scss"; | ||
import cancelImg from "./images/cancel1.png"; | ||
import React from 'react' | ||
import FixedContent from 'fengui/component/page/FixedContent' | ||
import styles from './Input.scss' | ||
import cancelImg from './images/cancel1.png' | ||
let Input = React.createClass({ | ||
getInitialState() { | ||
getInitialState () { | ||
return { | ||
focusInputName: "", | ||
focusInputName: '', | ||
removeCloseBtnTimer: null | ||
}; | ||
} | ||
}, | ||
formValueChange(name, len, event){ | ||
let {onChange}=this.props; | ||
var value = event.target.value; | ||
formValueChange (name, len, event) { | ||
let {onChange} = this.props | ||
var value = event.target.value | ||
if (value.length > len) { | ||
return false; | ||
return false | ||
} | ||
onChange(name, value); | ||
onChange(name, value) | ||
}, | ||
cancelFn(name){ | ||
let {onChange}=this.props; | ||
onChange(name, ""); | ||
cancelFn (name) { | ||
let {onChange} = this.props | ||
onChange(name, '') | ||
}, | ||
removeCloseBtn () { | ||
this.setState({ | ||
removeCloseBtnTimer: setTimeout(()=> { | ||
removeCloseBtnTimer: setTimeout(() => { | ||
this.setState({ | ||
focusInputName: "" | ||
}); | ||
focusInputName: '' | ||
}) | ||
}, 300) | ||
}); | ||
}) | ||
}, | ||
setFocusInputName(name){ | ||
let {removeCloseBtnTimer} = this.state; | ||
clearTimeout(removeCloseBtnTimer); | ||
setFocusInputName (name) { | ||
let {removeCloseBtnTimer} = this.state | ||
clearTimeout(removeCloseBtnTimer) | ||
this.setState({ | ||
focusInputName: name | ||
}); | ||
}) | ||
}, | ||
render() { | ||
let {focusInputName} = this.state; | ||
let {title, placeholder, name, disabled,maxlen,type,value} = this.props; | ||
componentDidMount () { | ||
if (this.props.autoFocus) { | ||
this.refs.inputRef.focus() | ||
} | ||
}, | ||
render () { | ||
let {focusInputName} = this.state | ||
let {title, placeholder, name, disabled, maxlen, type, value} = this.props | ||
return ( | ||
<FixedContent className={styles.this}> | ||
@@ -55,19 +56,19 @@ | ||
<input className={styles.write} | ||
placeholder={placeholder} | ||
type={ type ? type: "text" } | ||
disabled={disabled} | ||
onBlur={() => this.removeCloseBtn(name)} | ||
onFocus={()=>this.setFocusInputName(name)} | ||
value={value || ""} | ||
onChange={this.formValueChange.bind(this,name,maxlen)} | ||
<input ref='inputRef' className={styles.write} | ||
placeholder={placeholder} | ||
type={type || 'text'} | ||
disabled={disabled} | ||
onBlur={() => this.removeCloseBtn(name)} | ||
onFocus={() => this.setFocusInputName(name)} | ||
value={value || ''} | ||
onChange={this.formValueChange.bind(this, name, maxlen)} | ||
/> | ||
{value && (focusInputName === name) && | ||
<span onClick={()=>this.cancelFn(name)} className={styles.cancel}><img | ||
src={cancelImg}/></span>} | ||
<span onClick={() => this.cancelFn(name)} className={styles.cancel}><img | ||
src={cancelImg} /></span>} | ||
</div> | ||
</FixedContent> | ||
); | ||
) | ||
} | ||
}); | ||
export default Input; | ||
}) | ||
export default Input |
@@ -1,3 +0,4 @@ | ||
exports.Loading = require('./Loading'); | ||
exports.Paging = require('./Paging'); | ||
exports.Item = require('./Item'); | ||
exports.Loading = require('./Loading') | ||
exports.Paging = require('./Paging') | ||
exports.Item = require('./Item') | ||
{ | ||
"name": "fengui", | ||
"version": "0.7.9", | ||
"version": "0.7.10", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/fengjr", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
0
1
1
108416
65
1857
55