<li v-for="(kxz, index) in kxz " id="wz1">
      <div class="grid-content bg-purple input">
        <input class="text_fz"  :id="'text'+index"  type="text" :value=kxz.wz>
        <el-button @click="myCopy(index)" :data-id="index" type="primary" plain>复制地址</el-button>
      </div>
  </el-row>
</li>
myCopy: function(index) {
  // console.log(index)
  let ele = document.getElementById("text"+index);
  ele.select();
  document.execCommand("Copy");
  // alert("复制成功");
}
Logo

前往低代码交流专区

更多推荐