| | |
| | | this.setState({visible: true}) |
| | | } |
| | | |
| | | resetconfig = (item, Tab, copyBtns, uuids = {}) => { |
| | | item.floor = Tab.floor + 1 |
| | | resetconfig = (item, Tab, copyBtns, uuids = {}, floor) => { |
| | | item.tabId = Tab.uuid |
| | | item.parentId = Tab.parentId |
| | | |
| | |
| | | tab.uuid = uuids[tab.uuid] |
| | | tab.parentId = item.uuid |
| | | |
| | | if (item.floor >= 3) { |
| | | 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) |
| | | cell = this.resetconfig(cell, tab, copyBtns, uuids, floor + 1) |
| | | return cell |
| | | }) |
| | | }) |
| | |
| | | item.name = item.setting.name |
| | | |
| | | item.components = item.components.map(cell => { |
| | | cell.floor = Tab.floor + 1 |
| | | cell.tabId = Tab.uuid |
| | | cell.parentId = Tab.parentId |
| | | |
| | |
| | | } |
| | | |
| | | let copyBtns = new Map() |
| | | let floor = MenuUtils.getFloor(Tab.parentId) |
| | | |
| | | res = this.resetconfig(res, Tab, copyBtns) |
| | | res = this.resetconfig(res, Tab, copyBtns, {}, floor) |
| | | |
| | | delete res.copyType |
| | | |