实现点击切换底部导航更换图标
<template>
<div>
<div class="tabbar">
<div class="tabbar_con" >
<div class="tab_icon" v-for="(item,index) in tabs" :key="index" @click="addClassName(index)">
<router-link class="tab_icon_r tab_icon_left" :to="item.url">
<p class="icon">
<img :src="thatnum==index?item.active:item.img" alt="icon">
</p>
<span :class="thatnum==index?'active':'on'">{
{item.text}}</span>
</router-link>
</div>
</div>
</div&