1.1.3 • Published 5 years ago
xe-command v1.1.3
xe-command
XECommand 使用原生js实现复制文本到剪贴板的函数,支持常用H5的浏览器IE、Chrome、Firefox、Opera、Safari、IOS、Android,压缩后还不到1KB的轻量级copy函数
Browser Support
10+ ✔ | Latest ✔ | Latest ✔ | 41+ ✔ | 29+ ✔ | 10+ ✔ |
Installing
npm install xe-command --save
import XECommand from 'xe-command'
<script src="https://cdn.jsdelivr.net/npm/xe-command/dist/xe-command.js"></script>
<script src="https://unpkg.com/xe-command/dist/xe-command.js"></script>
Example
import XECommand from 'xe-command'
document.querySelector('.button').addEventListener('click', evnt => {
if (XECommand.copy('Copy this content to the clipboard')) {
alery('Copy success.')
} else {
alert('The browser is not supported.')
}
})
License
Copyright (c) 2017-present, Xu Liangzhan
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.19
6 years ago
1.0.18
6 years ago
1.0.17
6 years ago
1.0.16
6 years ago
1.0.15
6 years ago
1.0.14
6 years ago
1.0.12
6 years ago
1.0.11
6 years ago
1.0.10
6 years ago
1.0.9
6 years ago
1.0.7
6 years ago
1.0.6
6 years ago
1.0.5
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago