File tree Expand file tree Collapse file tree 6 files changed +18
-18
lines changed Expand file tree Collapse file tree 6 files changed +18
-18
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
- const props = defineProps <{ id? : string }>()
2
+ const { id } = defineProps <{ id? : string }>()
3
3
4
4
const { headings } = useRuntimeConfig ().public .mdc
5
- const generate = computed (() => props . id && headings ?.anchorLinks ?. h1 )
5
+ const generate = computed (() => id && (( typeof headings ?.anchorLinks === ' boolean ' && headings ?. anchorLinks === true ) || ( typeof headings ?. anchorLinks === ' object ' && headings ?. anchorLinks ?. h1 )) )
6
6
</script >
7
7
8
8
<template >
9
- <h1 :id = " id " class =" scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl" >
9
+ <h1 :id class =" scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl" >
10
10
<NuxtLink
11
11
v-if =" generate"
12
12
:to =" `#${id}`"
Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
- const props = defineProps <{ id? : string }>()
2
+ const { id } = defineProps <{ id? : string }>()
3
3
4
4
const { headings } = useRuntimeConfig ().public .mdc
5
- const generate = computed (() => props . id && headings ?.anchorLinks ?. h2 )
5
+ const generate = computed (() => id && (( typeof headings ?.anchorLinks === ' boolean ' && headings ?. anchorLinks === true ) || ( typeof headings ?. anchorLinks === ' object ' && headings ?. anchorLinks ?. h2 )) )
6
6
</script >
7
7
8
8
<template >
9
- <h2 :id = " id " class =" scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors [& :not(:first-child)]:mt-10" >
9
+ <h2 :id class =" scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors [& :not(:first-child)]:mt-10" >
10
10
<NuxtLink
11
11
v-if =" id && generate"
12
12
:to =" `#${id}`"
Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
- const props = defineProps <{ id? : string }>()
2
+ const { id } = defineProps <{ id? : string }>()
3
3
4
4
const { headings } = useRuntimeConfig ().public .mdc
5
- const generate = computed (() => props . id && headings ?.anchorLinks ?. h3 )
5
+ const generate = computed (() => id && (( typeof headings ?.anchorLinks === ' boolean ' && headings ?. anchorLinks === true ) || ( typeof headings ?. anchorLinks === ' object ' && headings ?. anchorLinks ?. h3 )) )
6
6
</script >
7
7
8
8
<template >
9
- <h3 :id = " id " class =" scroll-m-20 text-2xl font-semibold tracking-tight [& :not(:first-child)]:mt-8" >
9
+ <h3 :id class =" scroll-m-20 text-2xl font-semibold tracking-tight [& :not(:first-child)]:mt-8" >
10
10
<NuxtLink
11
11
v-if =" id && generate"
12
12
:to =" `#${id}`"
Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
- const props = defineProps <{ id? : string }>()
2
+ const { id } = defineProps <{ id? : string }>()
3
3
4
4
const { headings } = useRuntimeConfig ().public .mdc
5
- const generate = computed (() => props . id && headings ?.anchorLinks ?. h4 )
5
+ const generate = computed (() => id && (( typeof headings ?.anchorLinks === ' boolean ' && headings ?. anchorLinks === true ) || ( typeof headings ?. anchorLinks === ' object ' && headings ?. anchorLinks ?. h4 )) )
6
6
</script >
7
7
8
8
<template >
9
- <h4 :id = " id " class =" scroll-m-20 text-xl font-semibold tracking-tight [& :not(:first-child)]:mt-6" >
9
+ <h4 :id class =" scroll-m-20 text-xl font-semibold tracking-tight [& :not(:first-child)]:mt-6" >
10
10
<NuxtLink
11
11
v-if =" id && generate"
12
12
:to =" `#${id}`"
Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
- const props = defineProps <{ id? : string }>()
2
+ const { id } = defineProps <{ id? : string }>()
3
3
4
4
const { headings } = useRuntimeConfig ().public .mdc
5
- const generate = computed (() => props . id && headings ?.anchorLinks ?. h4 )
5
+ const generate = computed (() => id && (( typeof headings ?.anchorLinks === ' boolean ' && headings ?. anchorLinks === true ) || ( typeof headings ?. anchorLinks === ' object ' && headings ?. anchorLinks ?. h5 )) )
6
6
</script >
7
7
8
8
<template >
9
- <h5 :id = " id " class =" scroll-m-20 text-lg font-semibold tracking-tight [& :not(:first-child)]:mt-6" >
9
+ <h5 :id class =" scroll-m-20 text-lg font-semibold tracking-tight [& :not(:first-child)]:mt-6" >
10
10
<NuxtLink
11
11
v-if =" id && generate"
12
12
:to =" `#${id}`"
Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
- const props = defineProps <{ id? : string }>()
2
+ const { id } = defineProps <{ id? : string }>()
3
3
4
4
const { headings } = useRuntimeConfig ().public .mdc
5
- const generate = computed (() => props . id && headings ?.anchorLinks ?. h4 )
5
+ const generate = computed (() => id && (( typeof headings ?.anchorLinks === ' boolean ' && headings ?. anchorLinks === true ) || ( typeof headings ?. anchorLinks === ' object ' && headings ?. anchorLinks ?. h6 )) )
6
6
</script >
7
7
8
8
<template >
9
- <h6 :id = " id " class =" scroll-m-20 text-lg font-semibold tracking-tight [& :not(:first-child)]:mt-6" >
9
+ <h6 :id class =" scroll-m-20 text-lg font-semibold tracking-tight [& :not(:first-child)]:mt-6" >
10
10
<NuxtLink
11
11
v-if =" id && generate"
12
12
:to =" `#${id}`"
You can’t perform that action at this time.
0 commit comments