Browse Source

📝 Add documentation for Form in Modal

pull/25700/head
afc163 4 years ago
parent
commit
fb04927ada
  1. 6
      components/modal/index.en-US.md
  2. 6
      components/modal/index.zh-CN.md

6
components/modal/index.en-US.md

@ -44,9 +44,9 @@ When requiring users to interact with the application, but without jumping to a
#### Note
> - The state of Modal will be preserved at it's component lifecycle by default, if you wish to open it with a brand new state everytime, set `destroyOnClose` on it.
>
> - `Modal.method()` RTL mode only supports hooks.
- The state of Modal will be preserved at it's component lifecycle by default, if you wish to open it with a brand new state everytime, set `destroyOnClose` on it.
- There is a situation that using `<Modal />` with Form, which won't clear fields value when closing Modal even you have set `destroyOnClose`. You need `<Form preserve={false} />` in this case.
- `Modal.method()` RTL mode only supports hooks.
### Modal.method()

6
components/modal/index.zh-CN.md

@ -48,9 +48,9 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3StSdUlSH/Modal.svg
#### 注意
> - `<Modal />` 默认关闭后状态不会自动清空, 如果希望每次打开都是新内容,请设置 `destroyOnClose`
>
> - `Modal.method()` RTL 模式仅支持 hooks 用法。
- `<Modal />` 默认关闭后状态不会自动清空, 如果希望每次打开都是新内容,请设置 `destroyOnClose`
- `<Modal />` 和 Form 一起配合使用时,设置 `destroyOnClose` 也不会在 Modal 关闭时销毁表单字段数据,需要设置 `<Form preserve={false} />`
- `Modal.method()` RTL 模式仅支持 hooks 用法。
### Modal.method()

Loading…
Cancel
Save