copy


    //复制文本信息
    copyContext(val){
      const input = document.createElement('input')
      document.body.appendChild(input)
      input.setAttribute('value',val)
      input.select()
      if (document.execCommand('copy')) {
        document.execCommand('copy')
      }
      document.body.removeChild(input)

      this.$Message.success('This text message has been successfully copied.');
    },
原文地址:https://www.cnblogs.com/HePandeFeng/p/12950985.html