feat: improve layout structure and enhance scroll functionality in ViewPage
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 7s
This commit is contained in:
parent
5a2419c205
commit
d16428002d
2 changed files with 57 additions and 52 deletions
|
|
@ -364,7 +364,7 @@ onMounted(async () => {
|
||||||
<nav
|
<nav
|
||||||
class="row items-center no-wrap"
|
class="row items-center no-wrap"
|
||||||
:class="{
|
:class="{
|
||||||
active: currentPath === sub.route,
|
active: sub.route && currentPath.includes(sub.route),
|
||||||
disabled: sub.disabled,
|
disabled: sub.disabled,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -102,8 +102,8 @@ async function scrollTo(id: string) {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="col full-height scroll rounded">
|
<main class="row full-height q-gutter-sm">
|
||||||
<div v-if="content" style="display: flex" class="markdown">
|
<section v-if="content" class="markdown col scroll full-height rounded">
|
||||||
<div
|
<div
|
||||||
:key="ts"
|
:key="ts"
|
||||||
style="
|
style="
|
||||||
|
|
@ -123,18 +123,17 @@ async function scrollTo(id: string) {
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
></div>
|
></div>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
<div>
|
<section class="surface-1 rounded col-3 scroll full-height">
|
||||||
<q-scroll-area class="fit">
|
|
||||||
<q-list padding>
|
<q-list padding>
|
||||||
<template v-for="(token, idx) in contentParsed">
|
<template v-for="(token, idx) in contentParsed" :key="idx">
|
||||||
<q-item
|
<q-item
|
||||||
|
v-if="token.tag === 'h2' && token.type === 'heading_open'"
|
||||||
class="tabNative"
|
class="tabNative"
|
||||||
active-class="text-blue-7 active-item text-weight-medium tabActive"
|
active-class="text-blue-7 active-item text-weight-medium tabActive"
|
||||||
:active="active === token.attrGet('id')"
|
:active="active === token.attrGet('id')"
|
||||||
@click="scrollTo(token.attrGet('id') || '')"
|
@click="scrollTo(token.attrGet('id') || '')"
|
||||||
v-if="token.tag === 'h2' && token.type === 'heading_open'"
|
|
||||||
clickable
|
clickable
|
||||||
v-ripple
|
v-ripple
|
||||||
dense
|
dense
|
||||||
|
|
@ -168,11 +167,17 @@ async function scrollTo(id: string) {
|
||||||
</q-item-label>
|
</q-item-label>
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
|
|
||||||
|
<q-item clickable v-ripple dense exact>
|
||||||
|
<q-item-label>
|
||||||
|
<q-icon size="11px" name="mdi-circle-medium" />
|
||||||
|
mocking
|
||||||
|
</q-item-label>
|
||||||
|
</q-item>
|
||||||
</template>
|
</template>
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-scroll-area>
|
</section>
|
||||||
</div>
|
</main>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="css" scoped>
|
<style lang="css" scoped>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue