想要实现的效果如下:
代码实现如下:
<el-col :span="12" class="text-l">
<div class="jieogu-common" :class="{jiegou:changeActive == 0}" @click="changeStatus(0,0)" style="margin-left: 75px;">品牌</div>
<div class="jieogu-common" :class="{jiegou:changeActive == 1}" @click="changeStatus(1,1)">车龄</div>
<div class="jieogu-common" :class="{jiegou:changeActive == 2}" @click="changeStatus(2,2)">里程</div>
<div class="jieogu-common" :class="{jiegou:changeActive == 3}" @click="changeStatus(3,3)">等级</div>
<div id="piequickanynatic" :style="{width: '500px', height: '250px',}" style="margin-left:20px;margin-top:20px;"></div>
</el-col>
changeStatus(number,type){
this.changeActive = number;
}
over