Socket
Socket
Sign inDemoInstall

clipboard-all

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    clipboard-all

强大的复制功能, 可以复制图片和文字


Version published
Weekly downloads
8
increased by33.33%
Maintainers
1
Created
Weekly downloads
 

Readme

Source
强大的复制功能

可复制图片、文字到粘贴板,将你想复制的模块全部复制 轻巧便捷、功能强大

使用说明
#### 安装
yarn add clipboard-all --save
或者
npm install clipboard-all --save

使用
import clipboard from 'clipboard-all'
*[·-·]: 元素可以通过ref或者jquery的$(.className)等方式获取均可
let element = this.refs[refName]
let res = await clipboard(element)
if(res){  console.log('复制成功') }
说明

引入后可以调用函数,通过传入元素的方式,可以使用vue的获取元素方式,也可使用jQuery的获取元素的方式,调用后即可复制元素中的所有文字和图片内容
可以是一个大的父元素,就会复制父元素中的所有的文字和图片
强大的功能,快来尝试吧


Keywords

FAQs

Last updated on 20 Jul 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc