Inndy/vue-clipboard2

Allow to import on component only

Garito opened this issue · 3 comments

Hi!
I've noticed that your are defining the $copyText function and so on in the plugin

Instead of that, you could define the functions outside the plugin and export them

That way we could import it on a component which allows to load your library outside the main bundle

Thanks

Inndy commented

You should use clipboard.js directly in case you don't need the Vue.js part.

What I want is to use it on vue but not globally imported since I use it only in one component

I really suggest this plugin could be partly imported to the specif vue page because in most cases copy function is not required on every single page.
Hope this doc helpful.