<div v-for="(item,index) in list" :key="index" :class=" circleAnimation === 1 ? 'ball ball'+ (index+1) : 'ball ball1'+(index+1)" ref="circle" @click="oneClick(index)"> <div>{{item.name}}</div> </div> oneClick(index) { if (index !== 2) { this.circleAnimation = 1 const ref = this.$refs.circle[index].style } }