vue 点击切换图标

<div @click="showImg" class="showSearch">
<img class="header_img" v-if="!showSearch" src="~@/assets/images/board/btn-select-black.png"/>
<img class="header_img" v-if="showSearch" src="~@/assets/images/board/btn-select-blue.png"/>
</div>



showSearch:false,




showImg () {
this.showSearch = ! this.showSearch;
},
posted @ 2019-12-25 10:47  1点  阅读(4538)  评论(0编辑  收藏  举报