实现复制功能

<p style="margin-bottom: .6rem"><span>订单号:{{orderDetail.orderCode}}</span><span class="copy" @click="copyOrderClick">复制</span></p>
      <input type="text" v-model="copyOrderNum" ref="copyOrderInput" disabled style="opacity: 0;position:absolute;">
copyOrderClick(){
      this.$refs.copyOrderInput.select()
      document.execCommand("copy");
      
      this.showCopy = true
    },

 

posted @ 2018-07-26 14:36  靥放  阅读(131)  评论(0编辑  收藏  举报