优化调整、BT下载(有bug)
This commit is contained in:
+6
-4
@@ -31,14 +31,16 @@ const standaloneWindowApps: Array<[hash: string, label: string, loader: () => Pr
|
||||
['#screenshot-overlay', '截图覆盖层', () => import('./modules/screenshot/ScreenshotOverlay.vue')],
|
||||
['#screenshot-editor', '截图编辑器', () => import('./modules/screenshot/ScreenshotEditor.vue')],
|
||||
['#screenshot-pin', '贴图窗口', () => import('./modules/screenshot/ScreenshotPin.vue')],
|
||||
['#download-window', '下载窗口', () => import('./modules/downloader/DownloadWindow.vue')],
|
||||
]
|
||||
|
||||
const winHash = window.location.hash
|
||||
|
||||
// #screenshot-overlay 带窗口号参数(多屏),按前缀匹配;其余精确匹配
|
||||
const matched = standaloneWindowApps.find(([hash]) =>
|
||||
hash === '#screenshot-overlay' ? winHash.startsWith(hash) : winHash === hash
|
||||
)
|
||||
// #screenshot-overlay 带窗口号参数(多屏)、#download-window 带 ?task= 参数,按前缀匹配;其余精确匹配
|
||||
const matched = standaloneWindowApps.find(([hash]) => {
|
||||
if (hash === '#screenshot-overlay' || hash === '#download-window') return winHash.startsWith(hash)
|
||||
return winHash === hash
|
||||
})
|
||||
|
||||
if (matched) {
|
||||
const [, label, loader] = matched
|
||||
|
||||
Reference in New Issue
Block a user