Skip to content

Commit 084aefc

Browse files
authored
更新footer dom 元素透传示例
1 parent 79344dd commit 084aefc

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

docs/form-render/advanced-layout.md

+24-1
Original file line numberDiff line numberDiff line change
@@ -343,4 +343,27 @@ export default () => {
343343
/>
344344
);
345345
}
346-
```
346+
```
347+
348+
- `footer` dom 元素透传
349+
```jsx
350+
import React, { useState } from 'react';
351+
import { Button, Space, Form, Radio } from 'antd';
352+
import FormRender, { useForm } from 'form-render';
353+
import schema from './schema/simple';
354+
355+
export default () => {
356+
const form = useForm();
357+
358+
return (
359+
<FormRender
360+
schema={schema}
361+
form={form}
362+
maxWidth={360}
363+
footer={(dom) => (
364+
<Space>{dom}</Space>
365+
)}
366+
/>
367+
);
368+
}
369+
```

0 commit comments

Comments
 (0)