Nuxt module for vue-clipboard2 (deprecated in favor of using vue-clipboard2 directly)
A “copy to clipboard” module for Nuxt.js using vue-clipboard2
nuxt-clipboard2 dependency using yarn or npm to your projectnuxt-clipboard2 to modules section of nuxt.config.js{
modules: [
'nuxt-clipboard2',
]
}
You can use $copyText in almost any context using app.$copyText or this.$copyText (Including store actions).
See vue-clipboard2 official docs for more usage information.
export default {
methods: {
async copySomething(text) {
try {
await this.$copyText(text);
} catch (e) {
console.error(e);
}
},
},
};
Copyright © webcore-it
We use cookies
We use cookies to analyze traffic and improve your experience. You can accept or reject analytics cookies.