oliverfindl / vue-svg-inline-plugin

Vue plugin for inline replacement of SVG images with actual content of SVG files.
MIT License
33 stars 3 forks source link

add event handlers #11

Closed voronp closed 2 years ago

voronp commented 2 years ago

it drops event handlers right now, for instance, @click="onClick" not triggering

oliverfindl commented 2 years ago

Hello,

this is known issue of this package. This plugin is replacing original image node with new SVG node. I didn't found a way to transfer / clone Vue bindings from image node to SVG node. Therefore this won't work. As workaround, you can bind your event listener to wrapper of this image / SVG node.

If you have any more questions, feel free to ask here.

Thanks.

oliverfindl commented 2 years ago

Closing this issue.