I want my sHand
to add 6 per second but it works only once, If I try to do something like this: this.sHand++
it works fine and adds 1 degrees per second but I want 6 instead of 1 any solutions?
data:{
sHand: 30
},
computed:{
style(){
return { transform: 'rotate(' + this.sHand + 'deg)'}
}
},
created(){
setInterval(() => {
this.sHand + 6 // not working :/
},1000)
}
<div :style="style" class="secondhand"></div>