vue-clipboard2 icon indicating copy to clipboard operation
vue-clipboard2 copied to clipboard

Allow to import on component only

Open Garito opened this issue 6 years ago • 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

Garito avatar Sep 06 '19 00:09 Garito

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

Inndy avatar Sep 06 '19 06:09 Inndy

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

Garito avatar Sep 06 '19 08:09 Garito

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.

ykl124 avatar Oct 29 '19 10:10 ykl124