js-点击复制文件到剪贴板

  // 复制链接
  copyLinkHandler() {
    const input = document.querySelector('#private-link-code');
    input.value = this.copyLinkTxt;
    // 选中赋值过的input
    input.select();
    document.execCommand('Copy');
  }
原文地址:https://www.cnblogs.com/huangmin1992/p/12448841.html