diff --git a/src/views/project/unmannedVideo/videoData/index.vue b/src/views/project/unmannedVideo/videoData/index.vue index 6c452a2..e25ad21 100644 --- a/src/views/project/unmannedVideo/videoData/index.vue +++ b/src/views/project/unmannedVideo/videoData/index.vue @@ -29,7 +29,8 @@
- + +
{{ item.title }} @@ -94,6 +95,7 @@ multiple :limit="1" :on-success="uploadSuccess" + :before-upload="beforeUpload" style="width: 100%" > 点击上传 @@ -193,6 +195,15 @@ const form = ref({ startTime: "", endTime: "" }); +// 文件上传之前的钩子函数 +const beforeUpload = file => { + console.log(file); + const type = file.type; + if (type != "video/mp4") { + ElMessage.error("请上传视频文件"); + return false; + } +}; // 删除用户信息 const deleteAccount = async (params: jxj_User.ResUserList) => { await useHandleData(videoDataDelete, { id: params.id }, `删除`);