Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-clipboards

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-clipboards

Vue2.0 directive to copy or cut text to clipboard.

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

vue-clipboard

📋 Vue2.0 directive to copy or cut text to clipboard.

Vue wrapper for clipboard.js.

DEMO: https://zhuowenli.github.io/vue-clipboards/

Install

$ npm install vue-clipboards

Usage

import VueClipboards from 'vue-clipboards';

Vue.use(VueClipboards);

new Vue({
    data() {
        return {
            copyData: 'copy data'
        }
    }
});
<button v-clipboard="copyData">Copy</button>

Event

<button v-clipboard="copyData" @success="handleSuccess" @error="handleError">Copy</button>
import VueClipboards from 'vue-clipboards';

Vue.use(VueClipboards);

new Vue({
    data() {
        return {
            copyData: 'copy data'
        }
    },
    methods: {
        handleSuccess(e) {
            console.log(e);
        },
        handleError(e) {
            console.log(e);
        },
    }
});

Development

  • yarn dev: Run example in development mode
  • yarn deploy: Deploy example to gh-pages
  • yarn build: Build component in umd & es format
  • yarn watch: Build component in umd & es format with watch mode

Check out your npm scripts, it's using vbuild under the hood.


Generated by create-vue-app

FAQs

Package last updated on 06 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc