<div class="word" :class="{'bright':index == isActive}" v-for="(item,index) in name"
@click="activeClick(item,index)">
<img src="./images/triangle.png" class="triangle">
<span>{{item}}</span>
<van-icon name="checked" class="vanIcon" color="#3CB371" size="20" />
</div>
js
data: {
namber: '一',
nameInfo: '',
isActive: 0, //默认为0,即显示
},
activeClick(res, req) {
const changeNum = ['一', '二', '三', '四', '五', '六', '七', '八', '九'];
_this.namber = changeNum[req];//显示大写文字
_this.nameInfo = res;//显示单字
_this.isActive = req;//控制高亮显示
},