인프런 커뮤니티 질문&답변
답변 3
0
form의 경우는 어쩔 수 없습니다. 폼 검증이 들어가기 때문에요. 다른 프레임워크도 마찬가지입니다. 기본 앤트디 폼검증이 어려우시면 직접 코딩하셔도 됩니다.
0
안에 들어가있는 속성값들이 이해가 안가는게 많아요 ㅠ
<Form onSubmit={this.handleSubmit} className="login-form"> <Form.Item> {getFieldDecorator('username', { rules: [{ required: true, message: 'Please input your username!' }], })( <Input prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />} placeholder="Username" />, )} </Form.Item> <Form.Item> {getFieldDecorator('password', { rules: [{ required: true, message: 'Please input your Password!' }], })( <Input prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />} type="password" placeholder="Password" />, )} </Form.Item> <Form.Item> {getFieldDecorator('remember', { valuePropName: 'checked', initialValue: true, })(<Checkbox>Remember me</Checkbox>)} <a className="login-form-forgot" href=""> Forgot password </a> <Button type="primary" htmlType="submit" className="login-form-button"> Log in </Button> Or <a href="">register now!</a> </Form.Item> </Form>
복붙해서 바로 쓸수 있는게 아닌것 같아여 getFieldDecorator 이런 속성값 설정이 왜 들어가있는지도 파악이 어려워여
부트스트랩처럼 그냥 클래스만 설정하면 되는 그런 방식이 아니고 모르는 설정들이 많이 되어 있어서 어려워여 ㅠ
0





