From 34079ac9c6255ea333dc476b858da5de2bcdbabb Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Mon, 17 Mar 2025 16:41:59 +0700 Subject: [PATCH] chore: change variable name --- src/pages/00_manual/ViewPage.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/00_manual/ViewPage.vue b/src/pages/00_manual/ViewPage.vue index 1347efa0..f09d6597 100644 --- a/src/pages/00_manual/ViewPage.vue +++ b/src/pages/00_manual/ViewPage.vue @@ -30,7 +30,7 @@ const category = ref(''); const page = ref(''); const content = ref(''); const contentParsed = ref>(); -const active = ref(''); +const contentViewing = ref(''); const toc = ref(true); onMounted(async () => { @@ -79,7 +79,7 @@ function onScroll() { current = v.id; } }); - active.value = current; + contentViewing.value = current; } function onResize() { @@ -136,7 +136,7 @@ async function scrollTo(id: string) { v-if="token.tag === 'h2' && token.type === 'heading_open'" class="tabNative" active-class="text-blue-7 active-item text-weight-medium tabActive" - :active="active === token.attrGet('id')" + :active="contentViewing === token.attrGet('id')" @click="scrollTo(token.attrGet('id') || '')" clickable v-ripple @@ -156,7 +156,7 @@ async function scrollTo(id: string) { v-if="token.tag === 'h3' && token.type === 'heading_open'" class="tabNative child-tab" active-class="text-blue-7 active-item text-weight-medium tabActive" - :active="active === token.attrGet('id')" + :active="contentViewing === token.attrGet('id')" @click="scrollTo(token.attrGet('id') || '')" clickable v-ripple