页面顶部是不同分类,每个分类下是视频列表,切换到一个没有视频列表数据的分类下,之前的视频播放 video标签还是会存在,显示在页面上,这是为什么?控制台输出是没有数据的,应该什么都不显示才对啊?
这是有数据的情况
这是没有数据的情况
这是video标签还是会一直显示出来
下面是部分代码,请看下逻辑是否正确
<view class="" v-for="(item, index) in theCateList" :key="item.cate_id">
<view v-if="currentTabIndex == index" class="flex-sub">
<view>点击到的下标:{{index}}</view>
<view v-for="(itemm,indexx) in videoList" :key="itemm.movie_id">
<view class="diygw-col-17 text9-clz" v-html="text9"></view>
<view class="flex diygw-col-6 tag16-clz">
<view class="diygw-tag margin-xs xs radius-sm bg-red">
<text> VHS录像带 </text>
</view>
</view>
<view class="flex diygw-col-24">
<video src="https://cdn.jsdelivr.net/gh/xdlumia/files/video-play/IronMan.mp4" style="width: 100%; height: 200px" title="视频标题" poster="/static/ironMan.jpg" controls></video>
</view>
<view class="flex flex-wrap diygw-col-24 justify-start flex-clz">
<view class="flex diygw-col-24 justify-start flex-wrap flex85-clz">
<view class="flex diygw-col-6 justify-start flex-wrap-reverse flex2-clz">
<view class="diygw-col-18 text1-clz text-grey"> 发布时: </view>
</view>
<view class="flex flex-wrap diygw-col-6 flex-direction-column flex4-clz">
<view class="diygw-col-20 text3-clz diygw-text-xs text-grey"> 2022.03.28 </view>
</view>
<view class="flex diygw-col-6 flex-direction-column justify-start items-center flex-wrap-reverse flex6-clz">
<view class="flex diygw-col-24">
<view class="diygw-tag margin-xs diygw-capsule">
<view class="diygw-tag bg-red xs">
<text class="icon diy-icon-star"></text>
</view>
<view class="diygw-tag line-red xs"> 收藏 </view>
</view>
</view>
</view>
<view class="flex flex-wrap diygw-col-6 flex-direction-column flex8-clz">
<view class="flex diygw-col-24 justify-center">
<view class="diygw-tag margin-xs diygw-capsule">
<view class="diygw-tag bg-red xs">
<text class="icon diy-icon-down"></text>
</view>
<view class="diygw-tag line-red xs"> 下载 </view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>