toggle on click vue code example
Example: toggle on-click button vue
<button @click="variable = !variable">
Toggle Value
</button>
<script>
export default {
data () {
return {
variable: false
}
}
}
</script>
<button @click="variable = !variable">
Toggle Value
</button>
<script>
export default {
data () {
return {
variable: false
}
}
}
</script>