(pageName: string, id: string)
| 16 | }; |
| 17 | |
| 18 | const deleteLayoutItem = (pageName: string, id: string) => { |
| 19 | if (!pageName) pageName = currentRoutePath.value; |
| 20 | const items = getPageLayoutConfig(pageName); |
| 21 | let index = 0; |
| 22 | for (const iterator of items) { |
| 23 | if (iterator?.id === id) { |
| 24 | return items.splice(index, 1)?.[0]; |
| 25 | } |
| 26 | index++; |
| 27 | } |
| 28 | return null; |
| 29 | }; |
| 30 | |
| 31 | const insertLayoutItem = (pageName: string, card: LayoutCard, index?: number) => { |
| 32 | if (!pageName) pageName = currentRoutePath.value; |
no test coverage detected