vue-inline-svg icon indicating copy to clipboard operation
vue-inline-svg copied to clipboard

Composition api only?

Open lebadapetru opened this issue 4 years ago • 1 comments

I've completely removed my option api from the build and thus it seems i cannot use your component. Is there any change to make it composition api only compatible?

The error i receive:

[Vue warn]: Property "svgElSource" was accessed during render but is not defined on instance. 
  at <InlineSvg src="build/media/icons/duotone/Navigation/Angle-double-left.svg" > 
  at <Aside> 
  at <Layout onVnodeUnmounted=fn<onVnodeUnmounted> ref=Ref< undefined > > 
  at <RouterView> 
  at <App>

How i use the component:

import InlineSvg from "vue-inline-svg";

<inline-svg
            :src="'build/media/icons/duotone/Navigation/Angle-double-left.svg'"
          />

Package version: 3.0.0-beta.2

lebadapetru avatar Jun 22 '21 17:06 lebadapetru

For now, it uses options API like data, lifecycle hooks, and more. I believe there is no easy way to make it composition-api-only compatible. I guess inline-svg needs rewrite to work without options api.

shrpne avatar Jun 24 '21 14:06 shrpne