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, id: spell.id,
name: spell.name, name: spell.name,
classes: spell.classes, classes: spell.classes,
level: spell.level level: spell.level,
link: '/spell/' + spell.id,
} }
}) })

View file

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