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

app-element-upload

v1.0.1-0

Published

A upload component for Vue.js.

Downloads

6

Readme

element-upload

A element-upload component for Vue.js.

Demo

http://element-component.github.io/element-upload

Installation

npm i element-upload -D

Usage

import Vue from 'vue'
import ElUpload from 'element-upload'
import 'element-theme-default/dist/upload.css'

Vue.use(ElUpload)

or

import Vue from 'vue'
import ElUpload from 'element-upload'

Vue.component('el-upload', ElUpload)

Attribute

| 参数 | 说明 | 类型 | 可选值 | 默认值 | |---------- |-------------- |---------- |-------------------------------- |-------- | | action | 必选参数, 上传的地址 | string | — | — | | headers | 可选参数, 设置上传的请求头部 | object | — | — | | multiple | 可选参数, 是否支持多选文件 | boolean | — | — | | data | 可选参数, 上传时附带的额外参数 | object | — | — | | name | 可选参数, 上传的文件字段名 | string | — | file | | with-credentials | 支持发送 cookie 凭证信息 | boolean | — | false | | show-upload-list | 是否显示已上传文件列表 | boolean | — | true | | type | 上传控件类型 | string | select,drag | select | | accept | 可选参数, 接受上传的文件类型(thumbnail-mode 模式下此参数无效)| string | — | — | | on-preview | 可选参数, 点击已上传的文件链接时的钩子, 可以通过 file.response 拿到服务端返回数据 | function(file) | — | — | | on-remove | 可选参数, 文件列表移除文件时的钩子 | function(file, fileList) | — | — | | on-success | 可选参数, 文件上传成功时的钩子 | function(response, file, fileList) | — | — | | on-error | 可选参数, 文件上传失败时的钩子 | function(err, response, file) | — | — | | before-upload | 可选参数, 上传文件之前的钩子,参数为上传的文件,若返回 false 或者 Promise 则停止上传。 | function(file) | — | — | | thumbnail-mode | 是否设置为图片模式,该模式下会显示图片缩略图 | boolean | — | false | | default-file-list | 默认已上传的文件列表, 例如: [{name: 'food.jpeg', url: 'https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100'}] | array | — | [] |

Methods

| 方法名 | 说明 | 参数 | |---------- |-------------- | - | | clearFiles | 清空已上传的文件列表 | — |

Development

make dev

## test
make test

## build
make build

License

MIT