很简单,就是加上两个Input ,注意是是样式 设置为opacity
return (
<div className={styles.form}>
<input readOnly type="text" value="" style={{'opacity': 0}} />
<input readOnly type="password" style={{'opacity': 0}} />
<Input
className={styles.inputbox}
placeholder="用户名"
prefix={
<Icon type="user" />
}
value={username}
onFocus={this.bindDocumentKeypress}
onBlur={this.unbindDocumentKeypress}
onChange={onChangeUsername}
/>
<Input
className={styles.inputbox}
placeholder="密码"
prefix={
<Icon type="unlock" />
}
type="password"
value={password}
onFocus={this.bindDocumentKeypress}
onBlur={this.unbindDocumentKeypress}
onChange={onChangePassword}
/>
</div>
)
网友评论