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

@xme-react/web-upload

v0.2.7

Published

WebUpload

Readme

WebUplaod : web端文件上传组件

  • 支持单文件
  • 支持多文件
  • 支持文件夹
  • 支持拖拽单文件、多文件、文件夹

export default 导出 WebUpload

export 导出:

  • NormalFiles
  • DirectoryFiles
  • DragFiles
  • NormalControl
  • CloudControl
  • NormalUpload
  • CloudUpload
  • WebUpload
  • utils

WebUpload 组件使用说明

  • 基本参数

| 参数 | 说明 | 类型 | 是否必传 | 默认值 | | -------------- | --------------- | -------- |----------|----------------- | | uploadUrl | 文件上传地址 | string | | /sfs/webUpload/file?fileType=1| | autoUpload | 是否自动上传 | boolean | 否 | ture | | onProgress | 文件上传进度 | function | 否 | noop | | onSelected | 选中文件(夹)后的回调 | function | 否 | noop | | onSuccess | 上传完成后的回调 | function | | noop | | onError | 文件上传失败的回调 | function | 否 | noop | | normalUploadInfo| 常规input上传配置(详细见下) | object | 否 | {} | | dropUploadInfo | 拖拽上传配置(详细见下) | object | 否 | {} |

  • 参数normalUploadInfo 常规input上传配置(上传单个文件或多个文件) 默认启动

| 参数 | 说明 | 类型 | 是否必传 | 默认值 | | -------------- | --------------- | -------- |---------- |----------------- | | isNeed | 是否需要该input控件 | boolean | 否 | true | | id | 该input控件的id | string | 否 | _filesUpload_ | | label | 该input控件的label文案 | string | 否 | 上传文件 | | icon | 该input控件的icon | string | 否 | shangchuan | | multiple | 该input控件是否开启多选 | boolean | 否 | false | | accept | inputaccept属性(如'.png, .jpg')| string | 否 | '' | | onChange | 该input控件onChange对调 | function | 是 | noop | | wrapCls | 该组件最外层的元素className | string or object | 否 | '' | | labelCls | 该label元素className | string or object | 否 | '' | | iconCls | 该组件icon元素的className | string or object | 否 | '' |

  • 参数dirUploadInfo input上传文件夹配置 默认不启动

| 参数 | 说明 | 类型 | 是否必传 | 默认值 | | -------------- | --------------- | -------- |----------|----------------- | | isNeed | 是否需要该input控件 | boolean | 否 | false | | id | 该input控件的id | string | 否 | _directoryUpload_ | | label | 该input控件的label文案 | string | 否 | 上传文件夹 | | icon | 该input控件的icon | string | 否 | xinjianwenjianjia | | onChange | 该input控件onChange对调 | function | 否 | noop | | wrapCls | 该组件最外层的元素className | string or object | 否 | '' | | labelCls | 该label元素className | string or object | 否 | '' | | iconCls | 该组件icon元素的className | string or object | 否 | '' |

  • 参数dropUploadInfo 拖拽上传配置 默认不启动

| 参数 | 说明 | 类型 | 是否必传 | 默认值 | | -------------- | --------------- | -------- |----------|----------------- | | isNeed | 是否开启拖拽上传 | boolean | 否 | false | | dropZone | 拖拽感应区(querySelector获取) | string | 否 | _directoryUpload_ | | onDragenter | 拖拽感应区ondragenter回调 | function | 否 | noop | | onDragover | 拖拽感应区ondragover回调 | function | 否 | noop | | onDragleave | 拖拽感应区ondragleave回调 | function | 否 | noop | | onDrop | 拖拽感应区ondrop回调 | function | 否 | noop |