From e982411bfb4d54ffbbc8b4e1eb35aa40f199cf39 Mon Sep 17 00:00:00 2001 From: rookie4show Date: Sat, 28 Feb 2026 10:16:15 +0800 Subject: [PATCH] fix(layout): prevent page-level scrolling in editor shell --- src/App.vue | 64 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 22 deletions(-) diff --git a/src/App.vue b/src/App.vue index f2346b3..9af0278 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,7 +2,7 @@ import Toolbar from './components/Toolbar.vue'; import ProjectExplorer from './components/ProjectExplorer.vue'; import ComponentsPanel from './components/flow/ComponentsPanel.vue'; -import {computed, ref, onMounted, onUnmounted, reactive, watch} from "vue"; +import { onMounted, reactive, watch } from 'vue'; import {useFilesStore} from "@/ts/useStore"; import Vue3DraggableResizable from 'vue3-draggable-resizable'; import {TabPaneName, TabsPaneContext} from "element-plus"; @@ -18,12 +18,6 @@ import { useGlobalMessage } from '@/ts/useGlobalMessage'; const filesStore = useFilesStore(); const { showMessage } = useGlobalMessage(); -const width = ref('100%'); -const height = ref('100vh'); -const toolbarHeight = 48; // 工具栏的高度 -const windowHeight = ref(window.innerHeight); -const contentHeight = computed(() => `${windowHeight.value - toolbarHeight}px`); - const normalizeGraphData = (data: any) => { if (data && Array.isArray((data as any).nodes) && Array.isArray((data as any).edges)) { // 应用数据迁移 @@ -68,10 +62,6 @@ onMounted(() => { filesStore.setupAutoSave(); }); -onUnmounted(() => { - -}); - // 1) 切换激活文件:仅当 id 变化时保存旧数据并渲染新数据 watch( () => filesStore.activeFileId, @@ -177,9 +167,9 @@ watch( :name="file.id" /> -
+
@@ -190,9 +180,20 @@ watch(