Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to import on component only #71

Open
Garito opened this issue Sep 6, 2019 · 3 comments
Open

Allow to import on component only #71

Garito opened this issue Sep 6, 2019 · 3 comments

Comments

@Garito
Copy link

Garito commented Sep 6, 2019

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
Copy link
Owner

Inndy commented Sep 6, 2019

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

@Garito
Copy link
Author

Garito commented Sep 6, 2019

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

@ykl124
Copy link

ykl124 commented Oct 29, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants