From 8e36e054aa177f110fd352d5d650851f2dfb6169 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 01 六月 2023 17:46:08 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/components/normalform/modalform/index.jsx |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/components/normalform/modalform/index.jsx b/src/components/normalform/modalform/index.jsx
index c3e3144..28dc5c9 100644
--- a/src/components/normalform/modalform/index.jsx
+++ b/src/components/normalform/modalform/index.jsx
@@ -239,6 +239,24 @@
           return item || cell
         })
       })
+    } else if (item.reset_source) {
+      let map = new Map()
+      this.state.formlist.forEach(cell => {
+        if (!cell.field) return
+        map.set(cell.field, cell)
+      })
+
+      item.callback(map, this.record)
+
+      this.setState({
+        formlist: this.state.formlist.map(cell => {
+          if (!cell.field) return cell
+
+          let item = map.get(cell.field)
+
+          return item || cell
+        })
+      })
     }
   }
 

--
Gitblit v1.8.0