[web] Use "router link" for the list of index buttons
This commit is contained in:
parent
6ae8c4c6bd
commit
c513e0044e
|
@ -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,13 +15,8 @@
|
|||
<script>
|
||||
export default {
|
||||
name: 'IndexButtonList',
|
||||
props: ['index'],
|
||||
methods: {
|
||||
nav(id) {
|
||||
this.$router.push({ hash: '#index_' + id })
|
||||
}
|
||||
}
|
||||
props: ['index']
|
||||
}
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
<style></style>
|
Loading…
Reference in New Issue