React Semantic UI:关闭时为何模态删除所有DOM

时间:2019-06-10 03:19:53

标签: semantic-ui semantic-ui-react

我正在使用文档中的基本示例,模态运行良好,但是当我关闭模态时,它将删除所有DOM。怎么了?。

<Modal dimmer='inverted' size={"mini"} open={this.state.confirmDelete} onClose={this.close}>
                         <Modal.Header>Delete User</Modal.Header>
                         <Modal.Content>
                             <p>Are you sure you want to delete this user?</p>
                         </Modal.Content>
                         <Modal.Actions>
                             <Button negative onClick={this.cancelDelete}>No</Button>
                             <Button positive icon='checkmark' labelPosition='right' content='Yes' onClick={this.deleteUser} loading={this.state.deleting} />
                         </Modal.Actions>
                 </Modal>

0 个答案:

没有答案