(id: string)
| 140 | |
| 141 | // 删除页面 |
| 142 | export async function deletePage(id: string): Promise<void> { |
| 143 | const { page, message, tab } = stores |
| 144 | |
| 145 | await page.delete(id) |
| 146 | message.evict(id) |
| 147 | await useMessageQueueStore.getState().removeRecord(id) |
| 148 | |
| 149 | // 关闭对应的标签页 |
| 150 | const existingTab = tab.tabs.find((t) => t.dataId === id) |
| 151 | if (existingTab) { |
| 152 | tab.closeTab(existingTab.id) |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | // 批量删除页面 |
| 157 | export async function deletePages(ids: string[]): Promise<void> { |
nothing calls this directly
no test coverage detected