This commit is contained in:
parent
f24848d034
commit
12aab93c28
1 changed files with 3 additions and 2 deletions
|
|
@ -7,7 +7,7 @@
|
|||
class="btn btn--image"
|
||||
:aria-pressed="activeTracks.includes(track) ? true : false"
|
||||
:aria-controls="track.slug"
|
||||
:id="track.slug"
|
||||
:id="'track--' + track.slug"
|
||||
:style="`--btn-image: url(${getFrontViewUrl(track)});`"
|
||||
@click="selectTrack(track)"
|
||||
:data-comments="getCommentsCount(track)"
|
||||
|
|
@ -76,7 +76,8 @@ onBeforeMount(() => {
|
|||
});
|
||||
|
||||
onMounted(() => {
|
||||
const targetBtn = document.querySelector(route.hash);
|
||||
const selector = route.hash.replace('#', '#track--');
|
||||
const targetBtn = document.querySelector(selector);
|
||||
if (targetBtn) {
|
||||
targetBtn.scrollIntoView();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue