From 5da88beaf173540bce3bc2bb73e1617e6cfe3b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=BF=97=E9=B9=8F?= <2916022834@qq.com> Date: Tue, 21 Apr 2026 16:23:32 +0800 Subject: [PATCH] 1 --- src/App.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/App.vue b/src/App.vue index f9a7815..9280810 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,8 +1,6 @@ @@ -16,10 +14,14 @@ const globalStore = useGlobalStore() const loading = computed(() => globalStore.state.loading) const viewRef = ref() - const viewHeight = ref(0) + const viewStyle = ref({ + '--app-view-width': '', + '--app-view-height': '' + }) const observer = new ResizeObserver((entries) => { const { width, height } = entries[0].contentRect - viewHeight.value = height + viewStyle.value['--app-view-width'] = width + 'px' + viewStyle.value['--app-view-height'] = height + 'px' }) onMounted(() => { observer.observe(viewRef.value)