📜  vue js 复制文本到剪贴板 - Javascript代码示例

📅  最后修改于: 2022-03-11 15:02:34.780000             🧑  作者: Mango

代码示例1
methods: {
    copyURL() {
      var Url = this.$refs.mylink;
      Url.innerHTML = window.location.href;
      console.log(Url.innerHTML)
      Url.select();
      document.execCommand("copy");
    }
  }