From 5613e21138cc187a9fdb5a86aec47f02d23ac3df Mon Sep 17 00:00:00 2001 From: putyy Date: Wed, 23 Jul 2025 09:41:20 +0800 Subject: [PATCH] perf: index height calculation optimization --- frontend/src/stores/index.ts | 9 ------- frontend/src/views/index.vue | 47 ++++++++++++++++++++++++++++++------ 2 files changed, 40 insertions(+), 16 deletions(-) diff --git a/frontend/src/stores/index.ts b/frontend/src/stores/index.ts index 3828503..68c188d 100644 --- a/frontend/src/stores/index.ts +++ b/frontend/src/stores/index.ts @@ -41,8 +41,6 @@ export const useIndexStore = defineStore("index-store", () => { arch: "", }); - const tableHeight = ref(800) - const isProxy = ref(false) const baseUrl = ref("") @@ -62,8 +60,6 @@ export const useIndexStore = defineStore("index-store", () => { baseUrl.value = "http://127.0.0.1:" +globalConfig.value.Port window.$baseUrl = baseUrl.value - window.addEventListener("resize", handleResize); - handleResize() } const setConfig = (formValue: Object) => { @@ -71,10 +67,6 @@ export const useIndexStore = defineStore("index-store", () => { appApi.setConfig(globalConfig.value) } - const handleResize = () => { - tableHeight.value = document.documentElement.clientHeight || window.innerHeight - } - const openProxy = async () => { return appApi.openSystemProxy().then(handleProxy) } @@ -94,7 +86,6 @@ export const useIndexStore = defineStore("index-store", () => { return { appInfo, globalConfig, - tableHeight, isProxy, envInfo, baseUrl, diff --git a/frontend/src/views/index.vue b/frontend/src/views/index.vue index 1384512..aaa0dfe 100644 --- a/frontend/src/views/index.vue +++ b/frontend/src/views/index.vue @@ -1,6 +1,6 @@