解决bug

This commit is contained in:
red-deng-deng 2021-11-26 14:10:40 +08:00
parent 0af44b5aef
commit d304ac3679
2 changed files with 10 additions and 4 deletions

View File

@ -118,8 +118,14 @@ import classNames from 'classnames'
}
}
}
showpwd(e){
console.log('sjaidj',e);
showpwdFn(e){
if( e.props.markedShow){
if(e.props.kind=='password'){
e.props.markedShow('text');
}else{
e.props.markedShow('password');
}
}
}
render() {
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:'请输入'}/>
<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&&countShow==true?<span className="countTip">{this.state.iptVallength}/{maxLength}</span>:null}
{unit?<font className="unit">{unit}</font>:null}

View File

@ -19,7 +19,7 @@ export default class edittemplate extends React.Component{
id:"",
images:[],
thumb:null,
title:"标题",
title:"",
client:1,
bg_color:"",
button_color:"",