<p>邀请码</p>
<p class="inviteCode" id = "inviteCode">{{invite_code}}</p>
<p class="copy" @click="copy">复制</p>
 
copy() {
      var Url2 = document.getElementById("inviteCode").innerText;
      var oInput = document.createElement("input");
      oInput.value = Url2;
      document.body.appendChild(oInput);
      oInput.select(); // 选择对象
      document.execCommand("Copy"); // 执行浏览器复制命令
      oInput.className = "oInput";
      oInput.style.display = "none";
      msg("复制成功");
    } 
Logo

前往低代码交流专区

更多推荐