From 59e4012ced4e2390fa72c645af7218355abcc4d0 Mon Sep 17 00:00:00 2001 From: Mccree Lee Date: Sun, 14 Jul 2024 08:36:09 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20=E7=AA=97=E4=BD=93?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E5=90=8E=E6=98=BE=E7=A4=BA=20(#117)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * perf: show window after initializing * perf: remove redundant show() in sub windows --- src-tauri/tauri.conf.json | 3 ++- src/App.vue | 1 + src/views/t-anno-json.vue | 1 - src/views/t-anno.vue | 1 - src/views/t-post-json.vue | 1 - src/views/t-post.vue | 1 - 6 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index d927dd38..18b43962 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -45,7 +45,8 @@ "label": "TeyvatGuide", "width": 1600, "height": 900, - "center": true + "center": true, + "visible": false } ], "security": { diff --git a/src/App.vue b/src/App.vue index 2d5f0b8d..04f2bf57 100644 --- a/src/App.vue +++ b/src/App.vue @@ -51,6 +51,7 @@ onBeforeMount(async () => { await core.invoke("init_app"); urlListener = await getDeepLink(); } + await win.show(); }); onMounted(() => { diff --git a/src/views/t-anno-json.vue b/src/views/t-anno-json.vue index b1844c2a..be843c92 100644 --- a/src/views/t-anno-json.vue +++ b/src/views/t-anno-json.vue @@ -33,7 +33,6 @@ let jsonList = reactive({}); let jsonContent = reactive({}); onMounted(async () => { - await webviewWindow.getCurrent().show(); // 检查数据 if (!annoId) { loadingEmpty.value = true; diff --git a/src/views/t-anno.vue b/src/views/t-anno.vue index 503c24df..e4de7f69 100644 --- a/src/views/t-anno.vue +++ b/src/views/t-anno.vue @@ -59,7 +59,6 @@ const annoHtml = ref(); const annoBanner = ref(); onMounted(async () => { - await webviewWindow.getCurrent().show(); appVersion.value = await app.getVersion(); // 检查数据 if (!annoId || !region) { diff --git a/src/views/t-post-json.vue b/src/views/t-post-json.vue index 0c714199..2f1a05cc 100644 --- a/src/views/t-post-json.vue +++ b/src/views/t-post-json.vue @@ -30,7 +30,6 @@ let parseData = reactive([]); const isEmpty = ref(false); onMounted(async () => { - await webviewWindow.getCurrent().show(); if (!postId) { loadingEmpty.value = true; loadingTitle.value = "错误的 POST ID!"; diff --git a/src/views/t-post.vue b/src/views/t-post.vue index 09994a7b..daf4ced6 100644 --- a/src/views/t-post.vue +++ b/src/views/t-post.vue @@ -123,7 +123,6 @@ const shareTimeTimer = ref(); const showCollection = ref(false); onMounted(async () => { - await webviewWindow.getCurrent().show(); appVersion.value = await app.getVersion(); // 检查数据 if (!postId) {