浏览代码

增加文件类型

cxmo 1 年之前
父节点
当前提交
5e4e473a2e
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      src/mixins/index.js

+ 3 - 2
src/mixins/index.js

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