From af6486b3629d23e426ce85b87dbc20dfa15b1afe Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期一, 07 十一月 2022 18:50:27 +0800
Subject: [PATCH] 2022-11-07

---
 src/utils/utils-custom.js |   42 ++++++++++++++++++++++++++++++++----------
 1 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/src/utils/utils-custom.js b/src/utils/utils-custom.js
index 77d77ab..162b4cb 100644
--- a/src/utils/utils-custom.js
+++ b/src/utils/utils-custom.js
@@ -277,6 +277,31 @@
   }
 
   /**
+   * @description 鑾峰彇涓婄骇妯″潡
+   * @return {String}  selfId  褰撳墠缁勪欢id
+   */
+  static checkSupModules (modules, supId) {
+    let has = false
+
+    let check = (list) => {
+      list.forEach(m => {
+        if (has) return
+        if (supId === m.value) {
+          has = true
+          return
+        }
+        if (m.children) {
+          check(m.children)
+        }
+      })
+    }
+
+    check(modules)
+   
+    return has
+  }
+
+  /**
    * @description 鑾峰彇鍙叧鑱旀ā鍧�
    */
   static getLinkModules (components) {
@@ -598,6 +623,9 @@
         if (em) {
           item.setting.supModule = ''
         }
+        if (item.wrap && item.wrap.supModule) {
+          item.wrap.supModule = item.setting.supModule
+        }
       }
 
       if (item.wrap && item.wrap.doubleClick) {
@@ -805,16 +833,10 @@
     }
 
     if (item.setting && item.setting.supModule && item.setting.supModule[0] !== 'empty') {
-      let em = false
-      item.setting.supModule = item.setting.supModule.map(c => {
-        if (!uuids[c]) {
-          em = true
-        }
-        return uuids[c] || ''
-      })
-      if (em) {
-        item.setting.supModule = ''
-      }
+      item.setting.supModule = ''
+    }
+    if (item.wrap && item.wrap.supModule) {
+      item.wrap.supModule = ''
     }
 
     if (item.wrap && item.wrap.doubleClick) {

--
Gitblit v1.8.0