Parcourir la source

增加文件类型

cxmo il y a 1 an
Parent
commit
5e4e473a2e
1 fichiers modifiés avec 3 ajouts et 2 suppressions
  1. 3 2
      src/mixins/index.js

+ 3 - 2
src/mixins/index.js

@@ -146,11 +146,11 @@ const mixins = {
 				return true
 			} else if (fileName.match(/\.(pdf)/)) {
 				return true
-			}else if (fileName.match(/\.(mp3)/)) {
+			}else if (fileName.match(/\.(mp3|mp4)/)) {
 				return true
 			}else if (fileName.match(/\.(pptx|ppt)/)) {
 				return true
-			}else if (fileName.match(/\.(zip|7z)/)) {
+			}else if (fileName.match(/\.(zip|7z|rar)/)) {
 				return true
 			}
 			else {
@@ -174,6 +174,7 @@ const mixins = {
 					Message.warning('下载失败')
 					return
 				}
+				//bus.$parseData(response);
 				const content = data
 				const blob = new Blob([content])
 				if ('download' in document.createElement('a')) {