|
@@ -236,6 +236,10 @@ const handleUploadVideo = async (file) => {
|
|
|
timeDuration.value = `${String(parseInt(duration / 60)).padStart(2, '0')}:${String(parseInt(duration % 60)).padStart(2, '0')}`;
|
|
|
uploadVideo(file);
|
|
|
isVideoUploading.value = true;
|
|
|
+ return {
|
|
|
+ status: 'success',
|
|
|
+ response: {},
|
|
|
+ };
|
|
|
};
|
|
|
|
|
|
// 获取视频时长的Promise
|
|
@@ -394,12 +398,16 @@ const handlePreviewVideo = () => {
|
|
|
previewPopTitle.value = form.value.Title || '暂无标题';
|
|
|
previewVideoUrl.value = form.value.VideoUrl;
|
|
|
previewPop.value = true;
|
|
|
- previewVideo.play();
|
|
|
+ previewVideo.value.play();
|
|
|
};
|
|
|
|
|
|
// 结束预览弹窗关闭回调 -- 暂停视频
|
|
|
const endingPreview = () => {
|
|
|
- previewVideo.pause();
|
|
|
+
|
|
|
+ if (previewVideo.value) {
|
|
|
+ previewPop.value = false;
|
|
|
+ previewVideo.value.pause();
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
// 生命周期钩子 - 组件挂载时执行
|