Coder Social home page Coder Social logo

vue-plupload's Introduction

vue-plupload

将 plupload 封装进 Vue 1.*。

栗子

请参考 docs目录。 Demo

使用

  • 直接script引用,请直接引用 dist 目录下的文件。

  • CommonJS 方式

    • js引入
      var vue = require("vue");
      var VuePluload = require("vue-plupload");
      vue.use(VuePluload);
    • 模版中引用,
    <vue-plupload></vue-plupload>
  • RequireJS方式

    • config:
    requirejs.config({
        "vue-plupload": "[你本地的vue-plupload引用路径]"
    })
    • js引入
    require(["vue", "vue-plupload"], function(Vue, VuePlupload){
        Vue.use(VuePlupload);
    })
    • 模版中引用,
    <vue-plupload></vue-plupload>

参数

  • class, 覆盖上传按钮的默认Class
  • text, 覆盖上传安妮的默认文字
  • optionsplupload的默认参数,参考:http://www.plupload.com/docs/v2/Uploader 其中,browse_button,PostInit,FilesAdded,UploadProgress,FileUploaded,Error 这些参数及事件已经内部设置,无法覆盖。

事件

组件默认会发送如下事件,与plupload默认事件一一对应。

  • init, 对应plupload 事件 PostInit
  • added, 对应plupload 事件 FilesAdded
  • progress, 对应plupload 事件 UploadProgress
  • uploaded, 对应plupload 事件 FileUploaded
  • error, 对应plupload 事件 Error

属性

组件暴露 一个属性 uploader 指向所创建的 plupload 实例。

vue-plupload's People

Contributors

mm-sam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vue-plupload's Issues

Vue to "vue": "^2.1.0"?

Hello, This is nice work, although I can't understand chinese
Would you please upgrade the Vue to "vue": "^2.1.0"?

Thanks

domException 12 when calling plupload.start()

hi, thanks for your work.

I have issue when working with this package on docker container. somehow, it's not works.

the error say I have domException 12. when I check, that error occured when I try to call plupload.start within my component.

image

this issue not occured when Im using apache on xampp but did on my laradock with nginx and mysql.
please help. thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.