[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

View File

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