percise modal document

This commit is contained in:
afc163 2017-03-22 15:25:12 +08:00
parent 821ca46b50
commit 19bebebc60
2 changed files with 3 additions and 3 deletions

View File

@ -36,10 +36,10 @@ and so on.
#### Destroy on close
> The state of Modal will be preserved at it's component lifecircle.
> If you wish to open it with brand new state everytime, you need to reset state manually. Or simply [give a new random key](https://github.com/ant-design/ant-design/issues/4165) to Modal when visible is changed to `true`, React will treat it as a new component.
> If you wish to open it with brand new state everytime, you need to reset state manually. Or simply [give a new key](https://github.com/ant-design/ant-design/issues/4165) to Modal when visible is changed to `true`, React will treat it as a new component.
> ```
> <Modal key={this.state.newRandomKey} visible={this.state.visible} />
> <Modal key={this.state.newKey} visible={this.state.visible} />
> ```
### Modal.xxx()

View File

@ -38,7 +38,7 @@ title: Modal
> 如果希望每次打开都是新内容,需要自行手动清空旧的状态。或者打开时给 Modal 设置一个[全新的 key](https://github.com/ant-design/ant-design/issues/4165) React 会渲染出一个全新的对话框。
> ```
> <Modal key={this.state.newRandomKey} visible={this.state.visible} />
> <Modal key={this.state.newKey} visible={this.state.visible} />
> ```
### Modal.xxx()