mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-18 10:18:14 +08:00
🐛 解决最小化无法唤起问题
This commit is contained in:
14
src/App.vue
14
src/App.vue
@@ -167,10 +167,12 @@ async function initData(): Promise<void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getDeepLink(): Promise<void> {
|
async function getDeepLink(): Promise<void> {
|
||||||
await event.listen("active_deep_link", (e) => {
|
await event.listen("active_deep_link", async (e) => {
|
||||||
new TauriWindow.WebviewWindow("TeyvatGuide")
|
const windowGet = new TauriWindow.WebviewWindow("TeyvatGuide");
|
||||||
.setFocus()
|
if (await windowGet.isMinimized()) {
|
||||||
.then(async () => {
|
await windowGet.unminimize();
|
||||||
|
}
|
||||||
|
await windowGet.setFocus();
|
||||||
if (typeof e.payload !== "string") {
|
if (typeof e.payload !== "string") {
|
||||||
showSnackbar({
|
showSnackbar({
|
||||||
text: "无效的 deep link!",
|
text: "无效的 deep link!",
|
||||||
@@ -200,10 +202,6 @@ async function getDeepLink(): Promise<void> {
|
|||||||
timeout: 3000,
|
timeout: 3000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
console.log(e);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user