Package Exports
- easycopyjs
- easycopyjs/dist/easycopy.esm.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (easycopyjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
EasyCopy
Copy text based on clipboard.js 2.0.11
Install
npm install --save easycopy clipboard
Usage
Usage
<div id="app"></div>
<template>
<section>
<button @click="doCopy">do Copy</button>
</section>
</template>
<script>
import { copyText } from 'easycopy'
export default {
methods: {
async doCopy() {
try {
const copyEvent = await copyText('something')
console.log('copy success', copyEvent)
} catch (e) {
console.log('copy fail', e)
}
},
},
}
</script>