docs: fix errors in example code (#28677)

This commit is contained in:
bigbigbo 2021-01-04 18:43:59 +08:00 committed by GitHub
parent 7def9de31d
commit b53a4b51ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ If you don't want to use the Item style, you can use `noStyle` prop to remove it
```jsx ```jsx
// antd v3 // antd v3
const Demo = ({ form: { setFieldsValue } }) => { const Demo = ({ form: { getFieldDecorator } }) => {
return <Form>{getFieldDecorator('username')(<Input />)}</Form>; return <Form>{getFieldDecorator('username')(<Input />)}</Form>;
}; };

View File

@ -118,7 +118,7 @@ class Demo extends React.Component {
```jsx ```jsx
// antd v3 // antd v3
const Demo = ({ form: { setFieldsValue } }) => { const Demo = ({ form: { getFieldDecorator } }) => {
return <Form>{getFieldDecorator('username')(<Input />)}</Form>; return <Form>{getFieldDecorator('username')(<Input />)}</Form>;
}; };