-
카테고리
-
세부 분야
풀스택
antd 코드가 잘 이해가 안가는데 사이트 가서 봐도 어려운데 쉽게 이해하는 방법이 있나여?
19.08.16 23:08 작성 조회수 20
0
삭제된 글입니다
답변을 작성해보세요.
0
조현영
지식공유자2019.08.17
form의 경우는 어쩔 수 없습니다. 폼 검증이 들어가기 때문에요. 다른 프레임워크도 마찬가지입니다. 기본 앤트디 폼검증이 어려우시면 직접 코딩하셔도 됩니다.
0
terecal
질문자2019.08.17
안에 들어가있는 속성값들이 이해가 안가는게 많아요 ㅠ
<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
답변 3