Vue用v-for给循环标签添加属性
用单向数据绑定v-bind:style
简写方式,在属性名前加冒号
<p class="song-lyric-item" v-for="(i,index) of this.lyricData" :key="index":data-time = "i.time">{{i.lyric}}</p>
时间:2024-04-25 04:48:23
用单向数据绑定v-bind:style
简写方式,在属性名前加冒号
<p class="song-lyric-item" v-for="(i,index) of this.lyricData" :key="index":data-time = "i.time">{{i.lyric}}</p>