Skip to content

Commit

Permalink
Fix lock button
Browse files Browse the repository at this point in the history
  • Loading branch information
jlpereira committed Nov 9, 2018
1 parent d18602a commit a7eeb4c
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions app/javascript/vue/components/lock.vue
Expand Up @@ -2,8 +2,8 @@
<div
class="button-circle button-data"
:class="{
'btn-locked': locked,
'btn-unlocked': !locked
'btn-locked': value,
'btn-unlocked': !value
}"
@click="switchValue"
/>
Expand All @@ -17,15 +17,9 @@ export default {
default: false
}
},
data() {
return {
locked: false
}
},
methods: {
switchValue() {
this.locked = !this.locked
this.$emit('input', this.locked)
this.$emit('input', !this.value)
}
}
}
Expand Down

0 comments on commit a7eeb4c

Please sign in to comment.