From 62eff3734eb8456a4f26886d45961d6f9970763d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 10 一月 2025 15:02:45 +0800
Subject: [PATCH] 2025-01-10

---
 src/tabviews/custom/popview/index.jsx                    |    1 +
 src/tabviews/basetable/index.jsx                         |    1 +
 src/tabviews/custom/index.jsx                            |    1 +
 src/menu/components/share/actioncomponent/formconfig.jsx |   10 ++++++++++
 src/utils/utils-custom.js                                |    9 +++++++++
 src/menu/pastecontroller/index.jsx                       |   14 +++++++++++++-
 6 files changed, 35 insertions(+), 1 deletions(-)

diff --git a/src/menu/components/share/actioncomponent/formconfig.jsx b/src/menu/components/share/actioncomponent/formconfig.jsx
index 1cc0cf4..53fe5e4 100644
--- a/src/menu/components/share/actioncomponent/formconfig.jsx
+++ b/src/menu/components/share/actioncomponent/formconfig.jsx
@@ -364,6 +364,16 @@
     }
   }
 
+  if (card.syncComponents && card.syncComponents[0] && Array.isArray(card.syncComponents[0])) {
+    card.syncComponents = card.syncComponents.map((item, i) => {
+      return {
+        syncComId: item,
+        label: '',
+        uuid: 'fixed' + i
+      }
+    })
+  }
+
   let forms = [
     {
       type: 'select',
diff --git a/src/menu/pastecontroller/index.jsx b/src/menu/pastecontroller/index.jsx
index b9b8937..a570034 100644
--- a/src/menu/pastecontroller/index.jsx
+++ b/src/menu/pastecontroller/index.jsx
@@ -177,11 +177,23 @@
       btn.anchors = this.modules[id] || this.modules[_id] || null
     }
     if (btn.syncComponent && btn.syncComponent[0] === 'multiComponent' && btn.syncComponents) {
+      if (btn.syncComponents[0] && Array.isArray(btn.syncComponents[0])) { // 鍏煎闂鏁版嵁
+        btn.syncComponents = btn.syncComponents.map((item, i) => {
+          return {
+            syncComId: item,
+            label: '',
+            uuid: 'fixed' + i
+          }
+        })
+      }
+
       btn.syncComponents = btn.syncComponents.map(m => {
         let id = m.syncComId[m.syncComId.length - 1]
         let _id = md5(commonId + id)
 
-        return this.modules[id] || this.modules[_id] || null
+        m.syncComId = this.modules[id] || this.modules[_id] || null
+
+        return m.syncComId ? m : null
       })
       btn.syncComponents = btn.syncComponents.filter(Boolean)
 
diff --git a/src/tabviews/basetable/index.jsx b/src/tabviews/basetable/index.jsx
index c1a63d8..71f984e 100644
--- a/src/tabviews/basetable/index.jsx
+++ b/src/tabviews/basetable/index.jsx
@@ -580,6 +580,7 @@
         }
       } else if (cell.syncComponentId === 'multiComponent') {
         let ids = cell.syncComponents.map(m => {
+          if (Array.isArray(m)) return m.pop() || ''
           return m.syncComId.pop() || ''
         })
 
diff --git a/src/tabviews/custom/index.jsx b/src/tabviews/custom/index.jsx
index 639042b..14d42fc 100644
--- a/src/tabviews/custom/index.jsx
+++ b/src/tabviews/custom/index.jsx
@@ -1063,6 +1063,7 @@
         }
       } else if (cell.syncComponentId === 'multiComponent') {
         let ids = cell.syncComponents.map(m => {
+          if (Array.isArray(m)) return m.pop() || ''
           return m.syncComId.pop() || ''
         })
 
diff --git a/src/tabviews/custom/popview/index.jsx b/src/tabviews/custom/popview/index.jsx
index 778c090..261269a 100644
--- a/src/tabviews/custom/popview/index.jsx
+++ b/src/tabviews/custom/popview/index.jsx
@@ -755,6 +755,7 @@
         }
       } else if (cell.syncComponentId === 'multiComponent') {
         let ids = cell.syncComponents.map(m => {
+          if (Array.isArray(m)) return m.pop() || ''
           return m.syncComId.pop() || ''
         })
 
diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 660986e..ae0f36d 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -666,6 +666,15 @@
       btn.anchors = btn.anchors.map(m => md5(commonId + m))
     }
     if (btn.syncComponent && btn.syncComponent[0] === 'multiComponent' && btn.syncComponents) {
+      if (btn.syncComponents[0] && Array.isArray(btn.syncComponents[0])) {
+        btn.syncComponents = btn.syncComponents.map((item, i) => {
+          return {
+            syncComId: item,
+            label: '',
+            uuid: 'fixed' + i
+          }
+        })
+      }
       btn.syncComponents = btn.syncComponents.map(m => {
         m.syncComId = m.syncComId.map(n => {
           if (/\$focus/.test(n)) {

--
Gitblit v1.8.0