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