实现复制功能

<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
    },

原文地址:https://www.cnblogs.com/jongsuk0214/p/9371648.html