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