From e2afee71874538e31ed57032e3ad1bba1188ab4b Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 20 十月 2022 15:31:41 +0800
Subject: [PATCH] 2022-10-20

---
 src/menu/components/tabs/paste/index.jsx |   18 +++---------------
 1 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/src/menu/components/tabs/paste/index.jsx b/src/menu/components/tabs/paste/index.jsx
index 0f6fb9a..5fadf9c 100644
--- a/src/menu/components/tabs/paste/index.jsx
+++ b/src/menu/components/tabs/paste/index.jsx
@@ -24,10 +24,7 @@
     this.setState({visible: true})
   }
 
-  resetconfig = (item, Tab, copyBtns, uuids = {}, floor) => {
-    item.tabId = Tab.uuid
-    item.parentId = Tab.parentId
-    
+  resetconfig = (item, copyBtns, uuids = {}) => {
     if (item.type === 'tabs') {
       uuids[item.uuid] = MenuUtils.getuuid()
       item.uuid = uuids[item.uuid]
@@ -37,14 +34,9 @@
       item.subtabs.forEach(tab => {
         uuids[tab.uuid] = MenuUtils.getuuid()
         tab.uuid = uuids[tab.uuid]
-        tab.parentId = item.uuid
-
-        if (floor >= 3) {
-          tab.components = tab.components.filter(cell => cell.type !== 'tabs')
-        }
 
         tab.components = tab.components.map(cell => {
-          cell = this.resetconfig(cell, tab, copyBtns, uuids, floor + 1)
+          cell = this.resetconfig(cell, copyBtns, uuids)
           return cell
         })
       })
@@ -55,9 +47,6 @@
       item.name = item.setting.name
 
       item.components = item.components.map(cell => {
-        cell.tabId = Tab.uuid
-        cell.parentId = Tab.parentId
-
         cell = MenuUtils.resetComponentConfig(cell, copyBtns, uuids)
 
         return cell
@@ -100,9 +89,8 @@
       }
 
       let copyBtns = new Map()
-      let floor = MenuUtils.getFloor(Tab.parentId)
 
-      res = this.resetconfig(res, Tab, copyBtns, {}, floor)
+      res = this.resetconfig(res, copyBtns, {})
 
       delete res.copyType
       

--
Gitblit v1.8.0