[web] Use "router link" for the list of index buttons

This commit is contained in:
Alain Nussbaumer 2023-07-26 08:05:13 +02:00
parent 6ae8c4c6bd
commit c513e0044e
1 changed files with 8 additions and 13 deletions

View File

@ -1,13 +1,13 @@
<template>
<section>
<nav class="buttons is-centered mb-4 fd-is-square">
<a
v-for="char in index"
:key="char"
<router-link
v-for="id in index"
:key="id"
class="button is-small"
@click="nav(char)"
v-text="char"
/>
:to="'#index_' + id"
>{{ id }}</router-link
>
</nav>
</section>
</template>
@ -15,12 +15,7 @@
<script>
export default {
name: 'IndexButtonList',
props: ['index'],
methods: {
nav(id) {
this.$router.push({ hash: '#index_' + id })
}
}
props: ['index']
}
</script>