fix: BUG修改

This commit is contained in:
kun 2024-01-24 16:40:11 +08:00
parent 50b0092124
commit 2adeecce85
2 changed files with 7 additions and 4 deletions

View File

@ -1,7 +1,7 @@
<!--ckplayer 视频播放--> <!--ckplayer 视频播放-->
<template> <template>
<div style="height: 100%"> <div style="height: 100%">
<video :id="'videoItem' + name" style="width: 100%; height: 100%; object-fit: fill" :autoplay="autoPlay" muted /> <video :id="'videoItem' + name" style="width: 100%; height: 100%; object-fit: fill" controls :autoplay="autoPlay" muted />
</div> </div>
</template> </template>

View File

@ -180,12 +180,15 @@ export default {
}, },
changeVideo(item) { changeVideo(item) {
console.log("点击了列表----"); console.log("点击了列表----");
console.log(item, "xxxxxxxxxx"); console.log(item, "xxxxxxxxxx");
let itemVal = null; let itemVal = null;
itemVal = this.videoList.find((item2) => item.itemId == item2.itemId); itemVal = this.videoList.find((item2) => item.itemId == item2.itemId);
console.log(itemVal) console.log(itemVal);
if (!itemVal) { if (this.showType == 1) {
this.videoList = [item];
this.changeShowType(this.showType);
}
if (!itemVal && this.showType != 1) {
this.videoList.push(item); this.videoList.push(item);
this.changeShowType(this.showType); this.changeShowType(this.showType);
} }