title: Copy data(text) to Clipboard in Vue(Nuxt js)
body: <p>When I click the <code>vs-button</code>, the <code>single_download_link.pdfId</code> should be copied on clipboard.
  I tried like this. But it was not working. And I will not use <code>v-clipboard</code> node module.
  Please help me. Regards.</p>
  <p><strong>DOM code</strong>:</p>
  <pre><code>&lt;div ref=&quot;text&quot; class=&quot;w-full&quot;&gt;{{single_download_link.pdfId}}
  &lt;/div&gt;
  &lt;vs-button block @click=&quot;copy()&quot;&gt;
      Copy this link to clipboard.
  &lt;/vs-button&gt;
  //this is my function
  
  &lt;script&gt;
      import &quot;../../assets/css/products.css&quot;;
  
  
      export default {
          name: 'Products',
          components:{
              Vinput,
          },
          data () {
              return {
                  single_download_link:{
                      pdfId:&quot;&quot;,
                      pdfRandomName:&quot;&quot;,
                      uploaderUserName:&quot;&quot;,
                      uploaderUserId:&quot;&quot;,
                      uploaderUserEmail:&quot;&quot;
                  }
              }
          },
          methods:{
              copy(){
                  this.$refs.text.select();
                  document.execCommand('copy');
              },
          },
  
      }
  &lt;/script&gt;
  </code></pre>