Handle click events on svg shape loaded with vue-svg-loader with Vue

Viewed 68

I'm loading a relatively complex svg with vue-svg-loader in a Vue 2 project. I want to listen to every click on my defined rect shapes without messing with the svg file. How can I do this?

I tried adding an onclick property on my shapes, but then the problem will be that I'll have to call a vue method from plain javascript (and as I said, I'd prefer not to change the original svg file)

Thank you

0 Answers
Related