️ 窗体初始化后显示 (#117)

* perf: show window after initializing

* perf: remove redundant show() in sub windows
This commit is contained in:
Mccree Lee
2024-07-14 08:36:09 +08:00
committed by GitHub
parent cf66a7e128
commit 59e4012ced
6 changed files with 3 additions and 5 deletions

View File

@@ -45,7 +45,8 @@
"label": "TeyvatGuide", "label": "TeyvatGuide",
"width": 1600, "width": 1600,
"height": 900, "height": 900,
"center": true "center": true,
"visible": false
} }
], ],
"security": { "security": {

View File

@@ -51,6 +51,7 @@ onBeforeMount(async () => {
await core.invoke("init_app"); await core.invoke("init_app");
urlListener = await getDeepLink(); urlListener = await getDeepLink();
} }
await win.show();
}); });
onMounted(() => { onMounted(() => {

View File

@@ -33,7 +33,6 @@ let jsonList = reactive({});
let jsonContent = reactive({}); let jsonContent = reactive({});
onMounted(async () => { onMounted(async () => {
await webviewWindow.getCurrent().show();
// 检查数据 // 检查数据
if (!annoId) { if (!annoId) {
loadingEmpty.value = true; loadingEmpty.value = true;

View File

@@ -59,7 +59,6 @@ const annoHtml = ref<string>();
const annoBanner = ref<string>(); const annoBanner = ref<string>();
onMounted(async () => { onMounted(async () => {
await webviewWindow.getCurrent().show();
appVersion.value = await app.getVersion(); appVersion.value = await app.getVersion();
// 检查数据 // 检查数据
if (!annoId || !region) { if (!annoId || !region) {

View File

@@ -30,7 +30,6 @@ let parseData = reactive<TGApp.Plugins.Mys.SctPost.Base[]>([]);
const isEmpty = ref<boolean>(false); const isEmpty = ref<boolean>(false);
onMounted(async () => { onMounted(async () => {
await webviewWindow.getCurrent().show();
if (!postId) { if (!postId) {
loadingEmpty.value = true; loadingEmpty.value = true;
loadingTitle.value = "错误的 POST ID"; loadingTitle.value = "错误的 POST ID";

View File

@@ -123,7 +123,6 @@ const shareTimeTimer = ref<any>();
const showCollection = ref<boolean>(false); const showCollection = ref<boolean>(false);
onMounted(async () => { onMounted(async () => {
await webviewWindow.getCurrent().show();
appVersion.value = await app.getVersion(); appVersion.value = await app.getVersion();
// 检查数据 // 检查数据
if (!postId) { if (!postId) {