Quellcode durchsuchen

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta

lsc vor 4 Monaten
Ursprung
Commit
3aaded9506
1 geänderte Dateien mit 10 neuen und 10 gelöschten Zeilen
  1. 10 10
      src/components/pages/test/add/edit/index.vue

+ 10 - 10
src/components/pages/test/add/edit/index.vue

@@ -150,20 +150,20 @@ export default {
       input.type = "file";
       // input.accept = ".wav";
       // input.accept = "audio/*, .txt, .pdf, .xlsx";
-      input.accept = ".docx,.doc";
+      input.accept = ".docx";
       input.click();
       input.onchange = async () => {
         this.loading = true;
         let file = input.files[0];
-				if(/\.(doc)$/i.test(file.name)){
-					let params = convertApi.createParams()
-          params.add('file', file)
-					let result = await convertApi.convert('doc', 'docx', params)
-          // Get result file URL
-          file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
-            return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
-          });
-				}
+				// if(/\.(doc)$/i.test(file.name)){
+				// 	let params = convertApi.createParams()
+        //   params.add('file', file)
+				// 	let result = await convertApi.convert('doc', 'docx', params)
+        //   // Get result file URL
+        //   file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
+        //     return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
+        //   });
+				// }
 				console.log("file",file)
         if (!/\.(docx)$/i.test(file.name)) {
           this.loading = false;