更新
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div class="video-more-container">
|
||||
<el-carousel style="height: 100%;" motion-blur indicator-position="none" :autoplay="false"
|
||||
@change="handleCarouselChange">
|
||||
<el-carousel-item v-for="(item,index) in sbList" :key="index" >
|
||||
<div class="video-grid" v-if="activeIndex==index">
|
||||
<div v-for="(items,indexs) in item" :key="indexs" class="video-cell">
|
||||
@change="handleCarouselChange">
|
||||
<el-carousel-item v-for="(item, index) in sbList" :key="index">
|
||||
<div class="video-grid" v-if="activeIndex == index">
|
||||
<div v-for="(items, indexs) in item" :key="indexs" class="video-cell">
|
||||
<WsIframe :sbbh="items.sbbh" />
|
||||
</div>
|
||||
</div>
|
||||
@ -14,21 +14,21 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref ,onMounted} from 'vue'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import WsIframe from '@/components/wsIframe/index.vue'
|
||||
import emitter from "@/utils/eventBus.js";
|
||||
const activeIndex = ref(0)
|
||||
const handleCarouselChange = (index) => {
|
||||
activeIndex.value=index
|
||||
activeIndex.value = index
|
||||
}
|
||||
const sbList = ref([1])
|
||||
onMounted(()=>{
|
||||
onMounted(() => {
|
||||
emitter.on("getSxtGetList", (res) => {
|
||||
sbList.value= Array.from({ length:Math.ceil(res.length / 4)==0?1:Math.ceil(res.length / 4) }, (_, row) => {
|
||||
return res.slice(row * 4, row * 4 + 4)
|
||||
sbList.value = Array.from({ length: Math.ceil(res.length / 4) == 0 ? 1 : Math.ceil(res.length / 4) }, (_, row) => {
|
||||
return res.slice(row * 4, row * 4 + 4)
|
||||
}
|
||||
);
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user