mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 17:32:36 +00:00
Updates for Steps and TabMenu demos
This commit is contained in:
parent
c4d9c17a69
commit
00bc73113f
2 changed files with 25 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<component :is="$attrs.level === 2 ? 'h3' : 'h2'" class="doc-section-label">
|
||||
{{ $attrs.label }}
|
||||
<NuxtLink :id="$attrs.id" :to="`/${$router.currentRoute.value.name}/#${$attrs.id}`" target="_self" @click="onClick"> # </NuxtLink>
|
||||
<NuxtLink :id="$attrs.id" :to="`${checkRouteName}/#${$attrs.id}`" target="_self" @click="onClick"> # </NuxtLink>
|
||||
</component>
|
||||
<div v-if="$attrs" class="doc-section-description">
|
||||
<slot></slot>
|
||||
|
@ -22,6 +22,17 @@ export default {
|
|||
parentElement.scrollIntoView({ block: 'start' });
|
||||
}, 0);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
checkRouteName() {
|
||||
const path = this.$router.currentRoute.value.path;
|
||||
|
||||
if (path.lastIndexOf('/') === path.length - 1) {
|
||||
return path.slice(0, -1);
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue