vantUI: 在页面中使用了tab标签切换页面,页面中有组件是带有icon的,来回切换后icon会出现多个
wangren988888 opened this issue · 0 comments
wangren988888 commented
Affected version
0.14.1-beta.1
No same issues found.
- Yes, I search all issues but not found.
Steps to Reproduce
1、前端web页面使用tab标签,然后通过v-show控制标签页内容是否显示
2、来回切换后有icon的组件出现icon翻倍,切换几次变几个。
3、使用keep-alive标签缓存页面,切换页面,也会出现这个icon渲染多个的情况。
Code example
前端:
<div v-show="activeIndex === 0">
<div class="banner-view">
<van-swipe class="my-swipe" indicator-color="white">
<van-swipe-item v-for="(item, index) in images" :key="index">
<img class="swipe-img" :src="item" />
</van-swipe-item>
</van-swipe>
</div>
</div>
<keep-alive :include="keepAlivePageNameList">
<router-view />
</keep-alive>