npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

font-upload

v1.0.7

Published

提示信息

Readme

包名: font-upload

上传文件的组件

简介:

1、上传文件的组件

使用方式 (vue2):

1、import install from "font-upload" (main.js)

2、install(Vue); (main.js)

3、 (组件内部使用)

使用方式 (vue3):

1、import install from "font-upload" (main.js)

2、const app = createApp(App); (main.js)

3、install(app); (main.js)

4、app.mount("#app"); (main.js)

5、组件使用 (组件内部使用)

6、参数再最下方

如果 出现 esline 报错,请把它关掉 "no-self-assign": "off" "no-redeclare": "off"

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

属性 说明 类型 默认值 ==

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

multiple 是否多选 Boolean false

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

accept 上传文件的格式 * 代表全部 String * ( 例如.xls, .pdf, .png )

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

autoUpload 是否自动上传(即:选择完文件就上传) Boolean false

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

uploadFileKeyName 上传文件的key String files

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

timeout 请求超时时间 Number 6000(6秒)

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

staticData 要上传的静态数据 Object { } 可以不传,不传就说明没有要上传的静态数据

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

requestParams 请求的路径以及请求头headers Object { url: "/noPath", headers: {} }

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

fileList 文件列表(即:文件回显) Array [ { name: '文件名', delUrl: '删除文件的接口及参数', url: '文件路径可有可无' } ]

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

showFileList 是否显示上传的文件列表 Boolean true

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

fileSize 上传的文件大小限制 Number 500 ( 单位kb, 不需要传单位 )

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

tipsTime 提示信息时长 Number 3000

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

@upafter 上传完毕之后的回调 function ---

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

@delFile 删除文件列表的回调 function ---

————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————