The data rendered by v-for calls the common function method. Based on the click event, only the current data is called

problem description

Click on the current render data and only let the current data call. Click on any one now and you will call

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with a picture)
< div class= "tab_search" Vmurf for Fortune"(item,index) in list": key= "item.id" >

         <div class="huat_topic"><i class="huat"></i>{{item.topic}}{{index}}</div>
         <div class="tab_questions" v-for="(datas,index) in item.questions" :key="index">
           <i class="wfa">{{index+=1}}</i>{{datas}}</div>
           <div class="yuy">
             <div class="incon"  @click="aplayAudio(index,item,$event)">
               <div v-if="play" style="font-size: 18px;" class="iconfont icon-play-circle-o"></div>
               <div v-if="pause"  style="font-size: 18px;" class="iconfont icon-pause-circle-o"></div>
             <audio id="audio" :src="item.voiceFilePath" controls="controls" class="bof"></audio></div>
             <div id="tts" class="textars">{{item.answers}}</div>
             </div>
      </div>

aplayAudio (index,row,e) {

    console.log(index,row,e);
     let answers=row;
     console.log(answers.answers)
    let list=index;
     let ttsAudio=document.getElementById("audio");
 if(answers.answers){
      if( ttsAudio.paused){
       ttsAudio.play()
     this.play=false;
     this.pause=true;
      }else{ 
       ttsAudio.pause();
      this.play=true;
      this.pause=false;
      }
      
      } 
   },

what result do you expect? What is the error message actually seen?

topic description

sources of topics and their own ideas

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Apr.08,2022
Menu