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 🙏

© 2024 – Pkg Stats / Ryan Hefner

ant-design-upload-extend

v1.0.5

Published

这个项目是对 ant design upload 组件的扩展, 专用于 oss 前端直传!!!! 支持以下文件的直传,预览,直接下载。 image/*,.pdf,.xls,.xlsx,.ppt,.pptx,.doc,.docx

Downloads

12

Readme

info

这个项目是对 ant design upload 组件的扩展, 专用于 oss 前端直传!!!! 支持以下文件的直传,预览,直接下载。 image/*,.pdf,.xls,.xlsx,.ppt,.pptx,.doc,.docx

注意: oss的key_id 和 oss的secret 需要填写自己的信息

install

yarn add ant-design-upload-extend 

or

npm install ant-design-upload-extend 

Usage

<Uploader imageUrlExtend={{ 'x-oss-process': 'style/preview' }} 
        ossConfig={{accessKeyId: 'fake-4G2Huhqd3ByCdRczR9Lq', // oss的key_id
            accessKeySecret: 'fake-tp9yR1QIW4bGxukCKtX5yh79Gy', // oss的secret
            region: 'oss-cn-shanghai', // 地域节点
            bucket: 'xinglan', }}// bucket 名字
        antUploadParams={{accept: "image/*,.pdf,.xls,.xlsx,.ppt,.pptx,.doc,.docx",
            listType:"picture-card",
            className:"avatar-uploader",
            multiple:true}} 
        uploadTitle="请选择文件或图片"
        fileLimit={8 * 1024 * 1024} // 8M
        onSetFileList={(currentFileList) => { console.log('currentFileList', currentFileList) }}
    />

props

| params | info | extends | | --------------- | ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------- | | imageUrlExtend | 图片 oss 处理后缀 | { 'x-oss-process': 'style/preview' },这里的 x-oss-process是 oss 图片处理参数, style/preview是规则别名,需要自行在 oss 中设置 | | ossConfig | oss 相关信息 | | antUploadParams | ant design upload 的所有参数, | 注意 accept只允许如下值,因为涉及到预览和直接下载: "image/,.pdf,.xls,.xlsx,.ppt,.pptx,.doc,.docx", | | fileLimit | 文件大小限制 | 默认值 8 1024*1024, 8M | |uploadTitle| 上传文件按钮的文案|默认为 请选择文件或图片| |onSetFileList |在文件上传后,删除后,返回最新的文件列表|结构为[{uid:'', name: '', status: 'done' or 'error', response: '' or '上传失败', url,}]

LICENSE

MIT

ref 效果图

效果图