JSPM

easycopyjs

1.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 37
  • Score
    100M100P100Q58848F
  • License ISC

Copy texts Based on clipboard.js without a specific button

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

version npmDownloadTotal githubIssues

Install

npm install --save easycopyjs

Usage

<div id="app"></div>

<template>
    <section>
        <button @click="doCopy">do Copy</button>
    </section>
</template>

<script>
import { copyText } from 'easycopyjs'
export default {
    methods: {
        async doCopy() {
            try {
                const copyEvent = await copyText('something')
                console.log('copy success', copyEvent)
            } catch (e) {
                console.log('copy fail', e)
            }
        },
    },
}
</script>

end

If you feel helpful, you can come to Github give me a star, your ✨ is the biggest encouragement to me ~