diff --git a/src/components/input/main.js b/src/components/input/main.js index 2b07d4f6..37a47875 100644 --- a/src/components/input/main.js +++ b/src/components/input/main.js @@ -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' 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:'请输入'}/>
- {disabled==false&&kind=='password'?this.showpwd(this)}>-:null} + {disabled==false&&this.props.markedShow?this.showpwdFn(this)}>-:null} {disabled==false&&clearShow==true&&this.state.iptVal?:null} {disabled==false&&countShow==true?{this.state.iptVallength}/{maxLength}:null} {unit?{unit}:null} diff --git a/src/pages/exchangepage/edittemplate/main.js b/src/pages/exchangepage/edittemplate/main.js index 942632d7..0458a914 100644 --- a/src/pages/exchangepage/edittemplate/main.js +++ b/src/pages/exchangepage/edittemplate/main.js @@ -19,7 +19,7 @@ export default class edittemplate extends React.Component{ id:"", images:[], thumb:null, - title:"标题", + title:"", client:1, bg_color:"", button_color:"",