From 98f494cf633e3acf5c20f3e9de0d708f2a6c2045 Mon Sep 17 00:00:00 2001 From: ZhangXianQiang <1135831638@qq.com> Date: 星期五, 05 七月 2024 09:39:59 +0800 Subject: [PATCH] feat:视频浏览 --- src/views/folder/index.vue | 41 +++++++++++++++++++++++++++++++++++++++-- 1 files changed, 39 insertions(+), 2 deletions(-) diff --git a/src/views/folder/index.vue b/src/views/folder/index.vue index 8af363c..1901e4e 100644 --- a/src/views/folder/index.vue +++ b/src/views/folder/index.vue @@ -74,8 +74,17 @@ </div> <!-- 瑙嗛鏌ョ湅 --> - <div class="video-container"> - + <div class="video-container" v-show="videoViewer"> + <VideoViewer :videoUrl="videoUrl"></VideoViewer> + <div class="close-btn"> + <el-button type="danger" size="large" circle @click="closeViewer"> + <template #icon> + <el-icon :size="20"> + <Close /> + </el-icon> + </template> + </el-button> + </div> </div> </div> @@ -90,6 +99,8 @@ import { getFileList } from '@/api/modules/file.js'; import PDFViewer from '@/components/PDFViewer/index.vue'; +import VideoViewer from '@/components/VideoViewer/index.vue'; + import { useUserStore } from '@/store/index.js'; import useWebScoket from '@/hooks/useWebScoket.js'; @@ -117,6 +128,8 @@ iconPath: '/static/icons/file_type_video.png', handle: (item) => { console.log(item); + videoViewer.value = true; + videoUrl.value = [item.contentUrl.url]; resendMessage(); } }, @@ -140,6 +153,7 @@ const imageList = ref([]); const pdfFile = ref(''); +const videoUrl = ref(''); const fileList = ref([]); @@ -241,4 +255,27 @@ } } } + +.video-container { + width: 100%; + height: 100%; + position: absolute; + z-index: 99999; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + + .close-btn { + position: absolute; + top: 60px; + right: 100px; + z-index: 9999999; + + :deep(.el-button) { + width: fit-content; + height: fit-content; + padding: 10px !important; + } + } +} </style> \ No newline at end of file -- Gitblit v1.8.0