From 97b0c90b3a99c7483d61ad4945b6c01fa10224ec Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 14 八月 2021 01:06:59 +0800
Subject: [PATCH] 2021-08-14

---
 src/components/normalform/index.jsx |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/src/components/normalform/index.jsx b/src/components/normalform/index.jsx
index 5e1057e..2c3dfea 100644
--- a/src/components/normalform/index.jsx
+++ b/src/components/normalform/index.jsx
@@ -55,6 +55,12 @@
     })
   }
 
+  cancel = () => {
+    this.setState({ visible: false })
+
+    this.props.cancel && this.props.cancel()
+  }
+
   render () {
     const { title, width, children } = this.props
     const { visible, dict, formlist } = this.state
@@ -70,7 +76,7 @@
           maskClosable={false}
           okText={dict['model.confirm']}
           onOk={this.submit}
-          onCancel={() => { this.setState({ visible: false }) }}
+          onCancel={this.cancel}
           destroyOnClose
         >
           <ModalForm

--
Gitblit v1.8.0