problem description
In the
vue environment, when the audio tag plays automatically, changing the v-if condition of the div tag at the same level to no will cause the current audio to be paused.
there is no problem if you replace v-if with v-show
the following is part of the code
<audio class="basic-audio" :src="audio" autoplay="autoplay" @ended="ended"></audio>
<div class="content-region" v-if="chooseCard">
<el-row type="flex" v-for="(item,index) in contentList" :key="index" >
<el-col class="content-lattice" v-for="(item,index1) in item" :key="index1">{{item.name}}</el-col>
</el-row>
</div>
Note: no playback or pause events have been added to audio