0๐
โ
So if I understand you have an input in a vue component and want to use the input in two separate ways. How about:
<template>
<input
v-model="time"
@change="makeEnergy"
>
</template>
<script>
data(){
return {
time:0,
energy:0
},
methods: {
makeEnergy() {
this.energy = this.time/15
}
</script>
Then you can post the two data elements as you like.
Source:stackexchange.com