{"id":17784917,"url":"https://github.com/realgeoffrey/vue-input-file","last_synced_at":"2025-10-05T19:56:04.149Z","repository":{"id":57396314,"uuid":"222837885","full_name":"realgeoffrey/vue-input-file","owner":"realgeoffrey","description":"上传文件、本地展示（Vue@2组件）","archived":false,"fork":false,"pushed_at":"2025-08-01T06:21:04.000Z","size":25,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-04T11:41:12.284Z","etag":null,"topics":["input-file","upload-file","vue"],"latest_commit_sha":null,"homepage":"https://realgeoffrey.github.io/vue-input-file/demo/index.html","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/realgeoffrey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-11-20T02:56:49.000Z","updated_at":"2025-08-01T06:19:20.000Z","dependencies_parsed_at":"2025-08-02T03:38:35.312Z","dependency_job_id":"00d9d3ab-5cbd-450e-b45f-ed017226bf95","html_url":"https://github.com/realgeoffrey/vue-input-file","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/realgeoffrey/vue-input-file","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realgeoffrey%2Fvue-input-file","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realgeoffrey%2Fvue-input-file/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realgeoffrey%2Fvue-input-file/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realgeoffrey%2Fvue-input-file/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realgeoffrey","download_url":"https://codeload.github.com/realgeoffrey/vue-input-file/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realgeoffrey%2Fvue-input-file/sbom","scorecard":{"id":766372,"data":{"date":"2025-08-11","repo":{"name":"github.com/realgeoffrey/vue-input-file","commit":"75ebb6c21e405a2bc48231510925a878fbdfcb30"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-23T00:57:15.578Z","repository_id":57396314,"created_at":"2025-08-23T00:57:15.578Z","updated_at":"2025-08-23T00:57:15.578Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278510918,"owners_count":25998997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["input-file","upload-file","vue"],"created_at":"2024-10-27T08:22:13.290Z","updated_at":"2025-10-05T19:56:04.127Z","avatar_url":"https://github.com/realgeoffrey.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue-input-file\n\n[![NPM Version](https://img.shields.io/npm/v/vue-input-file)](https://www.npmjs.com/package/vue-input-file)\n![Vue 2](https://img.shields.io/badge/Vue_2-42b883)\n\n上传文件、本地展示（Vue@2组件）\n\ndemo：\u003chttps://realgeoffrey.github.io/vue-input-file/demo/index.html\u003e\n\n### 安装\n1. Node.js安装\n\n    ```bash\n    npm install vue-input-file --save\n    ```\n2. 浏览器引用\n\n    ```html\n    \u003c!-- 需要先引入vue：\u003cscript src=\"//unpkg.com/vue@2\"\u003e\u003c/script\u003e --\u003e\n    \u003cscript src=\"//unpkg.com/vue-input-file\"\u003e\u003c/script\u003e\n    ```\n\n### 注册组件\n1. Node.js注册\n\n    1. 全局注册\n\n        ```javascript\n        import Vue from 'vue'\n        import vueInputFile from 'vue-input-file'\n\n        // 全局注册\n        Vue.use(vueInputFile, { component: 'InputFile' }) // 组件名默认是：vue-input-file\n        // 或：Vue.component('InputFile', vueInputFile)\n        ```\n    2. 局部注册\n\n        ```javascript\n        import vueInputFile from 'vue-input-file'\n\n        export default {\n          components: {\n            // 局部注册\n            InputFile: vueInputFile\n          }\n        }\n        ```\n2. 浏览器注册\n\n    1. 全局注册\n\n        ```html\n        \u003c!-- 需要先引入vue：\u003cscript src=\"//unpkg.com/vue@2\"\u003e\u003c/script\u003e --\u003e\n        \u003c!-- 需要先引入vue-input-file：\u003cscript src=\"//unpkg.com/vue-input-file\"\u003e\u003c/script\u003e --\u003e\n\n        \u003cscript\u003e\n        // 全局注册\n        Vue.use(vueInputFile, { component: 'vue-input-file' }) // 组件名默认是：vue-input-file\n        // 或：Vue.component('vue-input-file', vueInputFile)\n        \u003c/script\u003e\n        ```\n    2. 局部注册\n\n        ```html\n        \u003c!-- 需要先引入vue：\u003cscript src=\"//unpkg.com/vue@2\"\u003e\u003c/script\u003e --\u003e\n        \u003c!-- 需要先引入vue-input-file：\u003cscript src=\"//unpkg.com/vue-input-file\"\u003e\u003c/script\u003e --\u003e\n\n        \u003cscript\u003e\n        new Vue({\n          components: {\n            // 局部注册\n            'vue-input-file': vueInputFile\n          }\n        })\n        \u003c/script\u003e\n        ```\n\n### 用法\n1. 参数\n\n    ```vue\n    \u003cInputFile\n      accept=\"input的accept属性（''）\"\n      :max-size=\"文件大小上限-M（0，无上限）\"\n      allow-blob-url=\"是否输出Blob URL（true）\"\n      allow-base64=\"是否输出base64（true）\"\n      @error=\"文件大小超过上限回调的方法，带参数{ msg }\"\n      @update=\"input提交文件成功后回调的方法，带参数{ file, blobUrl, base64 }\"\n    /\u003e\n    ```\n\n    \u003eTips：事件`update`会在提交完成后执行，就算与上一次提交相同文件也会再次执行；用户取消提交、文件大小超过上限终止提交（`error`触发）都不会触发`update`；`v-slot`插槽的内容与事件`update`同时更新。\n2. 插槽\n\n    ```vue\n    \u003cInputFile\n      v-slot=\"fileData\"\n    \u003e\n      文件-\u003e\u003cbr\u003e\n      {{ fileData.file \u0026\u0026 fileData.file.name }}\u003cbr\u003e\n      {{ fileData.blobUrl }}\u003cbr\u003e\n      {{ fileData.base64 }}\n    \u003c/InputFile\u003e\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealgeoffrey%2Fvue-input-file","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealgeoffrey%2Fvue-input-file","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealgeoffrey%2Fvue-input-file/lists"}