Last active
March 26, 2024 10:35
-
-
Save Kcko/585234320ef9c6b53be9a2b7534a59b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<p>{{ counterInfo.currentValue }} / {{ counterInfo.nextValue }}</p> | |
<button @click="pokus().a(50)">Pokus</button> | |
</template> | |
<script> | |
methods: { | |
pokus() { | |
return { | |
a: n => { | |
this.counter = n; | |
}, | |
}; | |
}, | |
}, | |
computed: { | |
counterInfo() { | |
return { | |
currentValue: this.counter, | |
nextValue: this.counter + 1, | |
// tohle nejde :D | |
beforeValue: () => { | |
return this.counter - 1; | |
}, | |
}; | |
}, | |
}, | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment