@mu-ui/mu-clipboard
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

mu-clipboard 剪贴板

安装方式

yarn add @mu-ui/mu-clipboard

使用指南

// 插件
import Clipboard from '@mu-ui/mu-clipboard'

Vue.use(Clipboard)

...
methods: {
  async copy() {
    const res = await this.$copyText('复制文案内容')
    if (res.result === 'success') {
      // 成功
    } else if (res.result === 'empty') {
      // 内容为空
    } else if (res.result === 'error') {
      // 失败
    }
  }
}

Package Sidebar

Install

npm i @mu-ui/mu-clipboard

Weekly Downloads

4

Version

0.1.0

License

MIT

Unpacked Size

39.9 kB

Total Files

7

Last publish

Collaborators

  • jr93