1.1.3 • Published 7 years ago

vue2-file-upload v1.1.3

Weekly downloads
18
License
MIT
Repository
-
Last release
7 years ago

vue2-file-upload

vue文件上传组件支持拖动上传 支持显示进度条,大文件上传比较友好

安装

npm install vue2-file-upload -S

使用

// ES6
import vue2FileUpload from 'vue2-file-upload.js'

// 导入
Vue.use(vue2FileUpload)

// 作为组件的方式使用
<vue2-file-upload></vue2-file-upload>

配置

   <vue2-file-upload 
    title="将APK拖拽到此区域或者点击上传" 
    url='http://xxx.com'
    @schedule="schedule"
    @out="out"></vue2-file-upload>
methods:{
    // 成功拿到的后端返回
    out(ev){
      console.log(ev)
    }
    // 上传过程中拿到的进度
    schedule(ev){
        console.log(ev)
    }
}

Props

nameDescriptiontypedefault
title框里面显示的文字String
accept需要限制的文件类型String*
color文字颜色String#d3d3d3
border边框String3px dashed silver
hoverColor拖入文字颜色Stringrgb(32,160,255)
hoverBorder拖入边框String3px dashed rgb(32,160,255)
url请求的地址String
isFooter是否显示底部Booleantrue
isApk是否限制APK格式Booleantrue

Events

nameDescription
schedule上传过程中触发事件
out上传完成触发事件

MIT

舍与得

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago