vuedropzone 超级文件上传组件

安装

npm install vue2-dropzone

如何使用

<vue-dropzone ref="myVueDropzone" id="dropzone" :options="dropzoneOptions"></vue-dropzone>
import vue2Dropzone from 'vue2-dropzone'
import 'vue2-dropzone/dist/vue2Dropzone.min.css'
export default {
  name: 'app',
  components: {
    vueDropzone: vue2Dropzone
  },
  data: function () {
    return {
      dropzoneOptions: {
          url: 'https://httpbin.org/post',
          thumbnailWidth: 150,
          maxFilesize: 0.5,
          headers: { "My-Awesome-Header": "header value" }
      }
    }
  }
}

Demo 地址

基本演示 https://rowanwins.github.io/vue-dropzone/docs/dist/index.html#/demo

原文地址:https://www.cnblogs.com/tangwei89/p/11611283.html