Socket
Book a DemoInstallSign in
Socket

clipboard-all

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clipboard-all

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

1.0.8
latest
npmnpm
Version published
Weekly downloads
7
-73.08%
Maintainers
1
Weekly downloads
 
Created
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

copy

FAQs

Package last updated on 20 Jul 2021

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.