Apidoc emit-prop type navigate completed

This commit is contained in:
Bahadır Sofuoğlu 2023-03-04 16:43:35 +03:00
parent 22077da98c
commit df4d30c4cd
5 changed files with 89 additions and 27 deletions

View file

@ -1,5 +1,5 @@
<template>
<component :is="$attrs.level === 2 ? 'h3' : 'h2'" class="doc-section-label">
<component :is="headerTag" class="doc-section-label">
{{ $attrs.label }}
<NuxtLink :id="$attrs.id" :to="`${checkRouteName}/#${$attrs.id}`" target="_self" @click="onClick"> # </NuxtLink>
</component>
@ -32,6 +32,15 @@ export default {
}
return path;
},
headerTag() {
if (this.$attrs.level === 3) {
return 'h4';
} else if (this.$attrs.level === 2) {
return 'h3';
}
return 'h2';
}
}
};