I'm facing an issue with reactive data in vue3 new composition api, here is what i'm trying to do
Setup
const imagesStyles = computed(() => {
return { 'transform': `scale(${scale.value}) rotate(${rotation.value})` }
});
Template :
<img
:key="index"
:src="images[index]"
:style="imagesStyles" />
however, even if the value of rotation/scale
, the transform
property do not change inside the styles, but if i change color value its working flawlessly on the tag style
But what more weird, is that i tried to debug using {{imageStyles}}
to show its value directly as text inside html, and its updating correctly.
do you have any idea why that is not working?