1
我试图使用React Bootstrap和react-fa(font-awesome)将图标添加到输入字段。有没有可以在Form Control组件上设置的道具?下面的代码我插入了一个图标,但它显然在输入之上而不在里面。带图标的React-Bootstrap FormControl
<form>
<FormGroup
controlId="formBasicText"
validationState={this.getValidationState()}
className="login-form"
>
<ControlLabel>Email address</ControlLabel>
<Icon spin name="spinner" />
<FormControl
type="text"
value={this.state.value}
placeholder="Your email"
onChange={this.handleChange}
className="login-input"
/>
<ControlLabel>Password</ControlLabel>
<FormControl
type="text"
value={this.state.value}
placeholder="Your password"
onChange={this.handleChange}
className="login-input"
/>
<FormControl.Feedback />
</FormGroup>
<Button bsStyle="success btn-raised btn-block" bsSize="large" onClick={this.closeModal}>Let's Go</Button>
</form>
我自己想知道同样的事情。你有没有想出一个解决方案? –