|
@@ -29,7 +29,7 @@
|
|
|
/>
|
|
|
|
|
|
<img
|
|
|
- v-if="['audio/wav','audio/x-m4a'].includes(item.type)"
|
|
|
+ v-if="['audio/wav','audio/x-m4a','audio/mpeg'].includes(item.type)"
|
|
|
src="../../../../assets/icon/classroomObservation/audio_file.svg"
|
|
|
/>
|
|
|
|
|
@@ -80,7 +80,7 @@
|
|
|
<img
|
|
|
src="../../../../assets/icon/classroomObservation/file_processing.svg"
|
|
|
/>
|
|
|
- <span>文件格式支持:mp4、wav、m4a、txt 文件</span>
|
|
|
+ <span>文件格式支持:mp4、mp3、wav、m4a、txt 文件</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="b_m_right">
|
|
@@ -230,7 +230,7 @@ export default {
|
|
|
addFile() {
|
|
|
let input = document.createElement("input");
|
|
|
input.type = "file";
|
|
|
- input.accept = "video/mp4, audio/wav, audio/x-m4a, text/plain";
|
|
|
+ input.accept = "video/mp4, audio/wav, audio/x-m4a, audio/mpeg, text/plain";
|
|
|
input.multiple = true; // 支持多文件上传
|
|
|
input.style.display = "none";
|
|
|
|
|
@@ -238,9 +238,11 @@ export default {
|
|
|
|
|
|
input.addEventListener("change", e => {
|
|
|
let files = e.target.files;
|
|
|
+ console.log(files)
|
|
|
for (let i = 0; i < files.length; i++) {
|
|
|
+
|
|
|
if (
|
|
|
- ["video/mp4", "audio/wav", "audio/x-m4a", "text/plain"].includes(files[i].type)
|
|
|
+ ["video/mp4", "audio/wav", "audio/x-m4a", "text/plain","audio/mpeg"].includes(files[i].type)
|
|
|
) {
|
|
|
this.fileList.push({
|
|
|
file: files[i],
|
|
@@ -253,7 +255,7 @@ export default {
|
|
|
status: "wait"
|
|
|
});
|
|
|
} else {
|
|
|
- this.$message.info("文件格式不支持,仅支持mp4、wav、m4a、txt文件。");
|
|
|
+ this.$message.info("文件格式不支持,仅支持mp4、mp3、wav、m4a、txt文件。");
|
|
|
}
|
|
|
}
|
|
|
if (!this.fileList.some(i => i.status === "uploading")) {
|