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

dt-upload

v0.1.14

Published

一个基于vue的上传组件

Readme

dt-upload

Vue Json upload for Vue.

Installation

NPM
npm install dt-upload

Mount

global
import Vue from 'vue'
import dtUpload from 'dt-upload'

// you can set default global options and events when use
Vue.use(dtUpload)
local
import { upload } from 'dt-upload'

export default {
  components: {
    upload
  }
}

Demo


// 文件上传
<upload v-model="file" :maxCount="1"></upload>

<script>
data() {
  return {
    files: [{ url: '....' }]
  }
}
</script>

api

Attributes

参数 | 说明 | 类型 | 可选值 | 默认值 ------- | -----------------------| -------------- | -------- |------------ value/v-model|绑定值 [{ url: '', name: 'asdsa.png' }] |array|--|-- maxSize |上传文件大小限制 1 = 1MB |number|--|-- accept |上传格式 例 '.jpg, .png, .jif' |string|--|image/* disabled |是否只读 |boolean|--|-- deletable |是否显示删除按钮|boolean|--|-- resultType | 字段表示文件读取结果的类型,上传大文件时,建议使用 file 类型,避免卡顿|string|file 结果仅包含 File 对象,text 结果包含 File 对象,以及文件的文本内容,dataUrl 结果包含 File 对象,以及文件对应的 base64 编码|'dataUrl','text','file'|dataUrl maxCount|最多上传数量|number|--|-- multiple|是否可多选|boolean|--|-- beforeRead|文件上传前的回调 | Function(files:上传的文件)|--|-- afterRead|文件读取完成后的回调函数 | Function(files:上传的文件)|--|-- beforeDelete|删除的回调函数|Function(file: 删除文件, index: 删除文件的索引)|--|--

Event

方法名 | 说明 | 参数
------- | ------- | -------------- oversize|文件读取大小超过限制的回调|files

Methods

方法名 | 说明 |参数
------- | ------- | -------------- onDelete| 删除某个文件 | (files:文件, index:文件索引)