1.1.3 • Published 7 years ago

xe-command v1.1.3

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

xe-command

npm version npm build npm downloads npm license

XECommand 使用原生js实现复制文本到剪贴板的函数,支持常用H5的浏览器IE、Chrome、Firefox、Opera、Safari、IOS、Android,压缩后还不到1KB的轻量级copy函数

Browser Support

IEEdgeChromeFirefoxOperaSafari
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

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

8 years ago