吉安感知网项目-前端
罗广辉
2026-06-03 d04ecbb2aa47d93e05d28bb551e7bad83d97d60f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<script setup>
const props = defineProps({
    width: {
        type: String,
        default: '800'
    },
    modelValue: {
        type: Boolean,
        default: false
    },
    playUrl: {
        type: String,
        default: ''
    },
    title:{
        type: String,
        default: '视频播放'
    }
})
 
const emit = defineEmits(['update:modelValue'])
const handleClose = () => {
    emit('update:modelValue', false)
}
</script>
 
<template>
    <el-dialog
        class="gd-dialog"
        :title="props.title"
        append-to-body
        v-model="props.modelValue"
        width="60%"
        destroy-on-close
        :close-on-click-modal="false"
        @close="handleClose"
    >
        <video ref="videoRefs" controls preload="auto"  :src="props.playUrl">
            <source :src="props.playUrl" type="video/mp4" />
        </video>
        <!--            <el-carousel trigger="click" :autoplay="false" @change="handleCarouselChange">-->
        <!--                <el-carousel-item v-for="(item, index) in videoList" :key="index">-->
        <!--                    <video ref="videoRefs" controls preload="auto"  :src="currentVideoUrl" @play="handleVideoPlay" @ended="handleVideoEnded(index)">-->
        <!--                        <source :src="item.smallUrl" type="video/mp4" />-->
        <!--                    </video>-->
        <!--                </el-carousel-item>-->
        <!--            </el-carousel>-->
    </el-dialog>
</template>
 
<style scoped lang="scss">
video {
    height: 600px;
    width: 100%;
}
</style>