From 4d8b89b3f0ff9ca2abdd4d8ce5f5807d5819f766 Mon Sep 17 00:00:00 2001 From: ZTL-UwU Date: Tue, 23 Jul 2024 22:42:50 +0800 Subject: [PATCH] fix: place aside in app.vue to avoid navigation shifts Signed-off-by: ZTL-UwU --- app.vue | 19 +++++++++- components/layout/Aside.vue | 2 +- pages/[...slug].vue | 74 ++++++++++++++++--------------------- pages/index.vue | 2 - 4 files changed, 49 insertions(+), 48 deletions(-) diff --git a/app.vue b/app.vue index bedfb019..05ccef02 100644 --- a/app.vue +++ b/app.vue @@ -1,8 +1,23 @@ diff --git a/components/layout/Aside.vue b/components/layout/Aside.vue index a94120a6..b0886c0f 100644 --- a/components/layout/Aside.vue +++ b/components/layout/Aside.vue @@ -45,5 +45,5 @@ const tree = computed(() => { return navigation.value; }); -const path = useRoute().path; +const path = computed(() => useRoute().path); diff --git a/pages/[...slug].vue b/pages/[...slug].vue index 21fdc665..71c72492 100644 --- a/pages/[...slug].vue +++ b/pages/[...slug].vue @@ -1,52 +1,40 @@