shrpne / vue-inline-svg

Dynamically loads an SVG source and inline <svg> element so you can manipulate the style of it
MIT License
175 stars 21 forks source link

Warning in Vue 3 #26

Closed daniesg closed 3 years ago

daniesg commented 3 years ago

It looks like Vue 3 will issue warnings when a custom event is emitted , but it's not defined in the emits option. https://v3.vuejs.org/guide/migration/emits-option.html#overview

Right now, I'm getting this warning in my console: Component emitted event "loaded" but it is neither declared in the emits option nor as an "onLoaded" prop.

I believe the solution is to just declare custom events in the emits option. I can open a pull request for this if that sounds good.

shrpne commented 3 years ago

Thank you!

I believe the solution is to just declare custom events in the emits option.

I think it should be enough. PRs are welcome :)

shrpne commented 3 years ago

Fixed

Thank you for your help!