File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,6 @@ import { useScrollStore } from '~/stores/scroll';
44export default < RouterConfig > {
55 scrollBehavior ( to , _from , savedPosition ) {
66 if ( savedPosition ) return savedPosition ;
7- if ( to . hash ) useScrollStore ( ) . scrollOrSet ( to . hash ) ;
7+ else if ( to . hash ) useScrollStore ( ) . scrollOrSet ( to . hash ) ;
88 }
99} ;
Original file line number Diff line number Diff line change 11<template >
22 <h2 :id =" props.id" >
3- <a
3+ <AppLink
44 v-if =" props.id && generate"
5- :href =" `#${props.id}`"
5+ :to =" `${$route.path} #${props.id}`"
66 >
77 <slot mdc-unwrap =" p" />
8- </a >
8+ </AppLink >
99 <slot v-else />
1010 </h2 >
1111</template >
@@ -17,4 +17,4 @@ const props = defineProps<{ id?: string }>()
1717
1818const { headings } = useRuntimeConfig ().public .mdc
1919const generate = computed (() => props .id && ((typeof headings ?.anchorLinks === ' boolean' && headings ?.anchorLinks === true ) || (typeof headings ?.anchorLinks === ' object' && headings ?.anchorLinks ?.h2 )))
20- </script >
20+ </script >
You can’t perform that action at this time.
0 commit comments