木星 2 weeks ago
parent
commit
75395033db
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/views/Resource/ResourceManage.vue

+ 1 - 1
src/views/Resource/ResourceManage.vue

@@ -228,7 +228,7 @@ const schema = reactive<FormSchema[]>([
228 228
       },
229 229
       beforeUpload: (rawFile) => {
230 230
         console.log('kokokoko', rawFile)
231
-        if (rawFile.type !== 'application/x-zip-compressed' && rawFile.name.indexOf('.rar') == -1) {
231
+        if (rawFile.name.indexOf('.zip') == -1 && rawFile.name.indexOf('.rar') == -1) {
232 232
           ElMessage.error('只能上传RAR、ZIP文件')
233 233
           return false
234 234
         }