Made spells into a special kind of action

This commit is contained in:
Thaum Rystra
2020-04-16 15:21:31 +02:00
parent e06196a54c
commit 1717ee4bc7
7 changed files with 389 additions and 251 deletions

View File

@@ -1,22 +1,23 @@
<template lang="html">
<v-list-tile class="ability-list-tile" v-on="hasClickListener ? {click} : {}">
<v-list-tile
class="ability-list-tile"
v-on="hasClickListener ? {click} : {}"
>
<v-list-tile-action class="mr-4">
<div class="display-1 mod">
{{ numberToSignedString(mod) }}
</div>
<div class="title value">
{{ value }}
</div>
</v-list-tile-action>
<v-list-tile-action class="mr-4">
<div class="display-1 mod">
{{numberToSignedString(mod)}}
</div>
<div class="title value">
{{value}}
</div>
</v-list-tile-action>
<v-list-tile-content>
<v-list-tile-title>
{{name}}
</v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
<v-list-tile-content>
<v-list-tile-title>
{{ name }}
</v-list-tile-title>
</v-list-tile-content>
</v-list-tile>
</template>
<script>
@@ -27,16 +28,16 @@ export default {
mod: Number,
name: String,
},
computed: {
hasClickListener(){
return this.$listeners && this.$listeners.click
},
},
methods: {
numberToSignedString,
click(e){
this.$emit('click', e);
},
},
computed: {
hasClickListener(){
return this.$listeners && this.$listeners.click
},
}
}
</script>