Explorar o código

文件上传 文件名回显处理

jingyuanchao %!s(int64=2) %!d(string=hai) anos
pai
achega
3e6b876243
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/components/K-FileUpload/index.vue

+ 2 - 0
src/components/K-FileUpload/index.vue

@@ -6,6 +6,7 @@
       :before-upload="handleBeforeUpload"
       :file-list="fileList"
       :limit="limit"
+      :accept="accept"
       :http-request="uploadFile"
       :show-file-list="false"
       :headers="headers"
@@ -81,6 +82,7 @@ export default {
         Authorization: "Bearer " + getToken(),
       },
       fileList: [],
+      accept: ".pdf,.jpg,.png,.bmp",
     };
   },
   watch: {