update: 关闭弹窗时销毁子元素,保证initialValue更新并且关闭弹窗时有动画效果

This commit is contained in:
深红
2019-05-28 10:27:27 +08:00
committed by GitHub
parent f6c869ad47
commit 51a7ce0827
+2 -1
View File
@@ -41,6 +41,7 @@ class User extends PureComponent {
const modalProps = {
item: modalType === 'create' ? {} : currentItem,
visible: modalVisible,
destroyOnClose: true,
maskClosable: false,
confirmLoading: loading.effects[`user/${modalType}`],
title: `${
@@ -163,7 +164,7 @@ class User extends PureComponent {
</Row>
)}
<List {...listProps} />
{modalVisible && <Modal {...modalProps} />}
<Modal {...modalProps} />
</Page>
)
}