How does v-for implement how to get the text node of a specified element?

generate a list through v-for. The tr in each line has a copy button. Click copy to implement a td text node in tr copy, does not know how to get the item.code text node. The specific code is as follows:

< tr v index = "(item,index) in userListLimit": key= "index" >

            <td>{{item.inserted_at}}</td>
            <td ref="itemCode">{{item.code}}</td>
            <td>{{item.inviter}}</td>
            <td>{{item.invitee}}</td>
            <td>{{item.when_long}}</td>
            <td :title="item.note">{{item.note}}</td>
            <td>
                <a v-if= "item.invitee==""?true:false" @click="myCopy($event)"></a>
            </td>

< / tr >
/ / Click to copy to the clipboard

  myCopy(event) {
   // event.target.parentNode.previousSibling.select()
    document.execCommand("Copy")
  },
Mar.04,2021

I would probably do this

 

directly take code as a parameter, and modify
myCopy in myCopy ($event), event is useful, useless myCopy (item.code), useful myCopy ($event,item.code);

then bind ref, to tr so that you can find the node through vue's ref.
< tr VFF = "(item,index) in userListLimit": key= "index": ref='item.code' >

Menu