浏览代码

文件上传 文件名回显处理

jingyuanchao 2 年之前
父节点
当前提交
3e6b876243
共有 1 个文件被更改,包括 2 次插入0 次删除
  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: {