1
0
Fork 0

[FIX] Anchor links instead of actions spell list

This commit is contained in:
Joe Wroten 2017-07-13 23:33:51 -05:00
parent 37f915e6d6
commit 7f20f8b300
2 changed files with 15 additions and 11 deletions

View file

@ -24,7 +24,8 @@ let indexedSpells = spellsWithIDs.map(spell => {
id: spell.id,
name: spell.name,
classes: spell.classes,
level: spell.level
level: spell.level,
link: '/spell/' + spell.id,
}
})

View file

@ -3,13 +3,15 @@
<div class="item-primary">
{{level}}
</div>
<div class="item-content has-secondary" v-on:click="openSpell">
<div class="item-content has-secondary">
<router-link :to="spell.link">
<div>
{{spell.name}}
</div>
<div>
{{classes}}
</div>
</router-link>
</div>
<div class="item-secondary" v-on:click="toggle">
<i
@ -50,9 +52,6 @@ export default {
'spell'
],
methods: {
openSpell (event) {
this.$router.push('/spell/' + this.spell.id)
},
toggle () {
dispatch({
type: 'CHANGE_CHOSEN',
@ -67,6 +66,10 @@ export default {
</script>
<style scoped lang="stylus">
.item-content a
color: black
div:not(:first-of-type)
color: rgba(0, 0, 0, .54)
.item-secondary
width: 50px
height: 50px