I am currently using a loop to iterate through some data in my store.js file, and everything is functioning as expected. However, I would like to add a condition to check if the Vue instance is active before applying a specific class to the polygon element. I am struggling with the syntax of this conditional statement without affecting note.content_type, which determines the dynamic class name.
Once I am able to set { active: isActive } on this element, I believe I will be able to update my data accordingly based on a tap or click event.
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="800" id="space" ref="sheets">
<g
v-for="(note, index) in notes"
:key="'note'+index"
:transform="`translate(${note.xpos}, ${note.ypos})`"
class="draggable"
>
<polygon
v-if="note.content_type == 'link'"
points="9.500000000000002,16.454482671904334 -19,2.326828918379971e-15 9.499999999999986,-16.45448267190434"
fill="#989898"
:class="note.content_type"
:id="note.id"
/>
</g>
Thank you once again for your help.