Skip to content

Commit

Permalink
docs(@formily/react-schema-renderer): fix docs example (#681)
Browse files Browse the repository at this point in the history
  • Loading branch information
laughing-pic-zhu authored Feb 26, 2020
1 parent f870676 commit a546e6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/react-schema-renderer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ import { Form } from 'antd'

export const CompatFormComponent = ({children,...props})=>{
return <Form {...props}>{children}</Form> //Very simple to use the Form component, props is the props of the SchemaForm component, here will be directly transparent
})
}

export const CompatFormItemComponent = ({children,...props})=>{
const messages = [].concat(props.errors || [], props.warnings || [])
Expand Down Expand Up @@ -317,6 +317,7 @@ export default ()=>{
formComponent={CompatFormComponent}
formItemComponent={CompatFormItemComponent}
/>
)
}

```
Expand Down
3 changes: 2 additions & 1 deletion packages/react-schema-renderer/README.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ import { Form } from 'antd'

export const CompatFormComponent = ({children,...props})=>{
return <Form {...props}>{children}</Form> //很简单的使用Form组件,props是SchemaForm组件的props,这里会直接透传
})
}

export const CompatFormItemComponent = ({children,...props})=>{
const messages = [].concat(props.errors || [], props.warnings || [])
Expand Down Expand Up @@ -313,6 +313,7 @@ export default ()=>{
formComponent={CompatFormComponent}
formItemComponent={CompatFormItemComponent}
/>
)
}

```
Expand Down

0 comments on commit a546e6a

Please sign in to comment.