From da83bcec5c6c1d401cca338ff6875607029d12f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=9D=A8?= <666> Date: Tue, 19 Nov 2024 09:42:19 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=A0=B7=E5=BC=8F=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/job-management/Details/index.vue | 20 +++++++- .../src/views/job-management/Left/index.vue | 47 ++++++++++++++----- .../src/views/job-management/index.vue | 13 +---- 3 files changed, 55 insertions(+), 25 deletions(-) diff --git a/src/renderer/src/views/job-management/Details/index.vue b/src/renderer/src/views/job-management/Details/index.vue index 696f090..306d4a7 100644 --- a/src/renderer/src/views/job-management/Details/index.vue +++ b/src/renderer/src/views/job-management/Details/index.vue @@ -68,19 +68,33 @@ const rightComponets = (str) => { default: return null } +} + // 获取视口高度 + const getViewportHeight = () => { + return Math.max( + document.documentElement.clientHeight, + window.innerHeight || 0 + ); } // 监听主页传过来的值 onMounted(() => { currentComponent.value = rightComponets(props.parameter.components) // 获取当前高度加上滚动条的高度 + pageHeight.value = getViewportHeight() - 210 nextTick(() => { - pageHeight.value = window.innerHeight + window.scrollY - 156; + window.addEventListener('resize', () => { + pageHeight.value = getViewportHeight() - 210; + }); }); }) \ No newline at end of file diff --git a/src/renderer/src/views/job-management/Left/index.vue b/src/renderer/src/views/job-management/Left/index.vue index 1b600ac..c195002 100644 --- a/src/renderer/src/views/job-management/Left/index.vue +++ b/src/renderer/src/views/job-management/Left/index.vue @@ -1,23 +1,25 @@ - + + - - - - - {{ item.title }} - - - {{ item.description }} - - - + + + + + {{ item.title }} + + + {{ item.description }} + + + + \ No newline at end of file