(pageName: string, sourceId: string, targetId: string)
| 41 | }; |
| 42 | |
| 43 | const moveCardItem = (pageName: string, sourceId: string, targetId: string) => { |
| 44 | if (!pageName) pageName = currentRoutePath.value; |
| 45 | const items = getPageLayoutConfig(pageName); |
| 46 | const sourceIndex = getIndexById(pageName, sourceId); |
| 47 | const targetIndex = getIndexById(pageName, targetId); |
| 48 | items.splice(targetIndex, 0, items.splice(sourceIndex, 1)[0]); |
| 49 | }; |
| 50 | |
| 51 | const getIndexById = (pageName: string, id: string) => { |
| 52 | if (!pageName) pageName = currentRoutePath.value; |
nothing calls this directly
no test coverage detected