From a1a9f756c8782c277dc8d6c55b91afd97b31d849 Mon Sep 17 00:00:00 2001 From: pa Date: Tue, 6 Jan 2026 23:37:35 +0900 Subject: [PATCH] fix Invalid layout total size --- src/composables/useAuthenticatedLayoutResizable.js | 8 ++++++++ src/views/Layout/AuthenticatedLayout.vue | 10 +++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/composables/useAuthenticatedLayoutResizable.js b/src/composables/useAuthenticatedLayoutResizable.js index 90954348..a96dafd7 100644 --- a/src/composables/useAuthenticatedLayoutResizable.js +++ b/src/composables/useAuthenticatedLayoutResizable.js @@ -63,6 +63,13 @@ export function useAuthenticatedLayoutResizable() { ); const asideMaxSize = computed(() => pxToPercent(asideMaxPx, undefined, 0)); + const mainDefaultSize = computed( + () => + 100 - + navDefaultSize.value - + (isSideBarTabShow.value ? asideDefaultSize.value : 0) + ); + const handleLayout = (sizes) => { if (!Array.isArray(sizes) || sizes.length < 2) { return; @@ -129,6 +136,7 @@ export function useAuthenticatedLayoutResizable() { navMaxSize, asideDefaultSize, asideMaxSize, + mainDefaultSize, handleLayout, isAsideCollapsed, isNavCollapsed, diff --git a/src/views/Layout/AuthenticatedLayout.vue b/src/views/Layout/AuthenticatedLayout.vue index a6973242..8d6f053b 100644 --- a/src/views/Layout/AuthenticatedLayout.vue +++ b/src/views/Layout/AuthenticatedLayout.vue @@ -6,16 +6,11 @@ class="group/main-layout flex-1 h-full min-w-0" @layout="handleLayout">