File was renamed from src/menu/utils/menuUtils.js |
| | |
| | | getUuids(c) |
| | | }) |
| | | } else { |
| | | if (item.action && item.action.length) { |
| | | if (item.action && item.action.length > 0) { |
| | | item.action.forEach(act => { |
| | | if (!act.origin) { |
| | | uuids.push(act.uuid) |
| | |
| | | } |
| | | }) |
| | | _card.backElements && _card.backElements.forEach(cell => { |
| | | if (cell.eleType === 'button') { |
| | | uuids.push(cell.uuid) |
| | | } |
| | | }) |
| | | }) |
| | | } else if (item.type === 'carousel') { |
| | | item.subcards.forEach(_card => { |
| | | _card.elements && _card.elements.forEach(cell => { |
| | | if (cell.eleType === 'button') { |
| | | uuids.push(cell.uuid) |
| | | } |
| | |
| | | */ |
| | | static resetConfig = (components) => { |
| | | return components.map(item => { |
| | | if (item.type === 'navbar') { |
| | | return item |
| | | } |
| | | |
| | | item.uuid = this.getuuid() |
| | | |
| | | if (item.type === 'tabs') { |
| | |
| | | return cell |
| | | }) |
| | | item.components = this.resetConfig(item.components) |
| | | } else if (item.type === 'card' || (item.type === 'table' && item.subtype === 'tablecard')) { |
| | | } else if (item.type === 'card' || item.type === 'carousel' || (item.type === 'table' && item.subtype === 'tablecard')) { |
| | | item.subcards.forEach(card => { |
| | | card.uuid = this.getuuid() |
| | | if (card.elements) { |