vue文本復制方法


docopy(text) {
      this.$copyText(text).then(message => {
        this.$message.success('復制完畢')
      }).catch(err => {
        console.log('copy.err', err)
        this.$message.error('復制失敗')
      })
    },

頁面代碼

<a-col :span="24"
                   class="title-out">
              <span class="person-info-item-title">★ 應用ID<span class="weak">:</span> <span class="person-info-item-value">{{ dataInfo.appKey }}</span></span>
              <a @click="docopy(dataInfo.appKey)">
                <a-icon type="copy"></a-icon>
              </a>
            </a-col>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM