Gathering detailed insights and metrics for vue-ele-upload-file
Gathering detailed insights and metrics for vue-ele-upload-file
Gathering detailed insights and metrics for vue-ele-upload-file
Gathering detailed insights and metrics for vue-ele-upload-file
npm install vue-ele-upload-file
Typescript
Module System
Node Version
NPM Version
Vue (80.97%)
JavaScript (15.04%)
HTML (3.99%)
Total Downloads
12,824
Last Day
1
Last Week
12
Last Month
90
Last Year
961
MIT License
13 Stars
15 Commits
6 Forks
1 Watchers
10 Branches
1 Contributors
Updated on Jan 06, 2025
Latest Version
0.0.7
Package Id
vue-ele-upload-file@0.0.7
Unpacked Size
67.56 kB
Size
24.67 kB
File Count
42
NPM Version
6.14.8
Node Version
14.14.0
Cumulative downloads
Total Downloads
1npm install vue-ele-upload-file --save
1import EleUploadFile from "vue-ele-upload-file"; 2 3export default { 4 components: { 5 EleUploadFile 6 } 7};
1<template> 2 <ele-upload-file 3 :responseFn="handleResponse" 4 action="https://jsonplaceholder.typicode.com/posts/" 5 v-model="file" 6 /> 7</template> 8<script> 9 export default { 10 data() { 11 return { 12 file: [] 13 }; 14 }, 15 methods: { 16 // 对请求结果处理, 返回对象 17 handleResponse(response, file) { 18 return { 19 url: URL.createObjectURL(file.raw), 20 name: file.name, 21 size: file.size 22 }; 23 } 24 } 25 }; 26</script>
1<template> 2 <ele-upload-file 3 :disabled="false" 4 :file-type="['doc', 'pdf', 'png', 'jpeg', 'jpg']" 5 :fileSize="2" 6 :isCanDelete="true" 7 :isCanDownload="true" 8 :isCanUploadSame="true" 9 :isShowSize="true" 10 :isShowTip="true" 11 :limit="6" 12 :multiple="true" 13 :responseFn="handleResponse" 14 action="https://jsonplaceholder.typicode.com/posts/" 15 placeholder="上传附件" 16 v-model="file" 17 /> 18</template>
1 props: { 2 // 值 3 value: [String, Object, Array], 4 // 必选参数,上传的地址 5 // 同 element-ui upload 组件 6 action: { 7 type: String, 8 required: true 9 }, 10 // 大小限制(MB) 11 fileSize: Number, 12 // 响应处理函数 13 responseFn: Function, 14 // 文件类型, 例如['png', 'jpg', 'jpeg'] 15 fileType: Array, 16 // 提示 17 placeholder: String, 18 // 是否禁用 19 disabled: Boolean, 20 // 是否显示文件大小 21 isShowSize: { 22 type: Boolean, 23 default: true 24 }, 25 // 是否显示下载 26 isCanDownload: { 27 type: Boolean, 28 default: true 29 }, 30 // 是否可删除 31 isCanDelete: { 32 type: Boolean, 33 default: true 34 }, 35 // 是否可上传相同文件 36 isCanUploadSame: { 37 type: Boolean, 38 default: true 39 }, 40 // 是否显示提示 41 isShowTip: { 42 type: Boolean, 43 default: true 44 }, 45 // 是否显示上传成功的提示 46 isShowSuccessTip: { 47 type: Boolean, 48 default: true 49 }, 50 // 删除前的操作 51 // 同 element-ui upload 组件 52 beforeRemove: Function 53 // 设置上传的请求头部 54 // 同 element-ui upload 组件 55 headers: Object, 56 // 是否支持多选文件 57 // 同 element-ui upload 组件 58 multiple: { 59 type: Boolean, 60 default: true 61 }, 62 // 上传时附带的额外参数 63 // 同 element-ui upload 组件 64 data: Object, 65 // 上传的文件字段名 66 // 同 element-ui upload 组件 67 name: { 68 type: String, 69 default: 'file' 70 }, 71 // 支持发送 cookie 凭证信息 72 // 同 element-ui upload 组件 73 withCredentials: { 74 type: Boolean, 75 default: false 76 }, 77 // 接受上传的文件类型 78 // 同 element-ui upload 组件 79 accept: String, 80 // 最大允许上传个数 81 // 同 element-ui upload 组件 82 limit: Number 83 },
事件名称 | 说明 | 回调参数 |
---|---|---|
remove | 当文件被删除时触发 | (file, fileList) |
success | 文件上传成功时触发 | (file, fileList) |
error | 上传失败时触发 | (error) |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 0/7 approved changesets -- score normalized to 0
Reason
project is archived
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
116 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreLast Day
0%
1
Compared to previous day
Last Week
-60%
12
Compared to previous week
Last Month
3.4%
90
Compared to previous month
Last Year
-17.9%
961
Compared to previous year