Skip to content

Commit

Permalink
⚡️ 窗体初始化后显示 (#117)
Browse files Browse the repository at this point in the history
* perf: show window after initializing

* perf: remove redundant show() in sub windows
  • Loading branch information
AuroraZiling authored Jul 14, 2024
1 parent cf66a7e commit 59e4012
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"label": "TeyvatGuide",
"width": 1600,
"height": 900,
"center": true
"center": true,
"visible": false
}
],
"security": {
Expand Down
1 change: 1 addition & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ onBeforeMount(async () => {
await core.invoke("init_app");
urlListener = await getDeepLink();
}
await win.show();
});
onMounted(() => {
Expand Down
1 change: 0 additions & 1 deletion src/views/t-anno-json.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ let jsonList = reactive({});
let jsonContent = reactive({});
onMounted(async () => {
await webviewWindow.getCurrent().show();
// 检查数据
if (!annoId) {
loadingEmpty.value = true;
Expand Down
1 change: 0 additions & 1 deletion src/views/t-anno.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ const annoHtml = ref<string>();
const annoBanner = ref<string>();

onMounted(async () => {
await webviewWindow.getCurrent().show();
appVersion.value = await app.getVersion();
// 检查数据
if (!annoId || !region) {
Expand Down
1 change: 0 additions & 1 deletion src/views/t-post-json.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ let parseData = reactive<TGApp.Plugins.Mys.SctPost.Base[]>([]);
const isEmpty = ref<boolean>(false);
onMounted(async () => {
await webviewWindow.getCurrent().show();
if (!postId) {
loadingEmpty.value = true;
loadingTitle.value = "错误的 POST ID!";
Expand Down
1 change: 0 additions & 1 deletion src/views/t-post.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ const shareTimeTimer = ref<any>();
const showCollection = ref<boolean>(false);
onMounted(async () => {
await webviewWindow.getCurrent().show();
appVersion.value = await app.getVersion();
// 检查数据
if (!postId) {
Expand Down

0 comments on commit 59e4012

Please sign in to comment.