解决bug
This commit is contained in:
parent
0af44b5aef
commit
d304ac3679
|
@ -118,8 +118,14 @@ import classNames from 'classnames'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
showpwd(e){
|
showpwdFn(e){
|
||||||
console.log('sjaidj',e);
|
if( e.props.markedShow){
|
||||||
|
if(e.props.kind=='password'){
|
||||||
|
e.props.markedShow('text');
|
||||||
|
}else{
|
||||||
|
e.props.markedShow('password');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
const {defalutCls,maxLength,kind,disabled,unit,icon, value,required,countShow,className,onChange,labelText,alignment, placeholder,height,width,clearShow,labelWidth} = this.props;
|
const {defalutCls,maxLength,kind,disabled,unit,icon, value,required,countShow,className,onChange,labelText,alignment, placeholder,height,width,clearShow,labelWidth} = this.props;
|
||||||
|
@ -171,7 +177,7 @@ import classNames from 'classnames'
|
||||||
|
|
||||||
<input name={this.props.name} disabled={disabled} type={kind} onBlur={this.losefofn} onFocus={this.focusFn} style={{resize:'none'}} value={this.props.value} onKeyDown={(e)=>this.sureFns(e)} maxLength={maxLength} onChange={this.clearContent} onInput={this.handleInputChange} style={{height:height,lineHeight:height,width:width,textOverflow:'ellipsis'}} className={classes} placeholder={placeholder?placeholder:'请输入'}/>
|
<input name={this.props.name} disabled={disabled} type={kind} onBlur={this.losefofn} onFocus={this.focusFn} style={{resize:'none'}} value={this.props.value} onKeyDown={(e)=>this.sureFns(e)} maxLength={maxLength} onChange={this.clearContent} onInput={this.handleInputChange} style={{height:height,lineHeight:height,width:width,textOverflow:'ellipsis'}} className={classes} placeholder={placeholder?placeholder:'请输入'}/>
|
||||||
<div className="ipticonR">
|
<div className="ipticonR">
|
||||||
{disabled==false&&kind=='password'?<span className="showpwd" onClick={()=>this.showpwd(this)}>-</span>:null}
|
{disabled==false&&this.props.markedShow?<span className="showpwd" onClick={()=>this.showpwdFn(this)}>-</span>:null}
|
||||||
{disabled==false&&clearShow==true&&this.state.iptVal?<svg onClick={this.clearItem.bind(this)} viewBox="0 0 16 16" width="16px" height="16px"><circle fill="#AAAFBA" fill-rule="evenodd" cx="8" cy="8" r="8"></circle><path d="M5.333 5.333l5.334 5.334M10.667 5.333l-5.334 5.334" stroke="#FFF" stroke-linecap="square"></path></svg>:null}
|
{disabled==false&&clearShow==true&&this.state.iptVal?<svg onClick={this.clearItem.bind(this)} viewBox="0 0 16 16" width="16px" height="16px"><circle fill="#AAAFBA" fill-rule="evenodd" cx="8" cy="8" r="8"></circle><path d="M5.333 5.333l5.334 5.334M10.667 5.333l-5.334 5.334" stroke="#FFF" stroke-linecap="square"></path></svg>:null}
|
||||||
{disabled==false&&countShow==true?<span className="countTip">{this.state.iptVallength}/{maxLength}</span>:null}
|
{disabled==false&&countShow==true?<span className="countTip">{this.state.iptVallength}/{maxLength}</span>:null}
|
||||||
{unit?<font className="unit">{unit}</font>:null}
|
{unit?<font className="unit">{unit}</font>:null}
|
||||||
|
|
|
@ -19,7 +19,7 @@ export default class edittemplate extends React.Component{
|
||||||
id:"",
|
id:"",
|
||||||
images:[],
|
images:[],
|
||||||
thumb:null,
|
thumb:null,
|
||||||
title:"标题",
|
title:"",
|
||||||
client:1,
|
client:1,
|
||||||
bg_color:"",
|
bg_color:"",
|
||||||
button_color:"",
|
button_color:"",
|
||||||
|
|
Loading…
Reference in New Issue