(id: string, updates: Partial<PageRecord>)
| 126 | |
| 127 | // 更新页面 |
| 128 | export async function updatePage(id: string, updates: Partial<PageRecord>): Promise<void> { |
| 129 | await stores.page.update(id, updates) |
| 130 | |
| 131 | // 同步更新标签页标题 |
| 132 | if (updates.name) { |
| 133 | const { tab } = stores |
| 134 | const existingTab = tab.tabs.find((t) => t.dataId === id) |
| 135 | if (existingTab) { |
| 136 | tab.updateTabTitle(existingTab.id, updates.name) |
| 137 | } |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | // 删除页面 |
| 142 | export async function deletePage(id: string): Promise<void> { |
no test coverage detected