Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Commit

Permalink
add validated props
Browse files Browse the repository at this point in the history
  • Loading branch information
james2doyle committed Dec 7, 2015
1 parent 2309b6c commit 6b6f9b3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-file-upload-component",
"version": "1.1.0",
"version": "1.1.1",
"description": "A simple file upload component for Vue.js. Emits events for XHR Upload Progress for nice progress bars.",
"homepage": "http://ohdoylerules.com",
"repository": "https://github.com/james2doyle/vue-file-upload-component",
Expand Down
15 changes: 14 additions & 1 deletion vue.file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@
// define
var FileUploadComponent = Vue.extend({
template: '<div class="{{ class }}"><input type="file" name="{{ name }}" id="{{ name }}" accept="{{ accept }}" v-on:click="fileInputClick" v-on:change="fileInputChange" multiple="{{ multiple }}"><button type="button" v-on:click="fileUpload">Upload</button></div>',
props: ['class', 'name', 'action', 'accept', 'multiple'],
props: {
class: String,
// a required string
name: {
type: String,
required: true
},
action: {
type: String,
required: true
},
accept: String,
multiple: String
},
data: function() {
return {
myFiles: [] // a container for the files in our field
Expand Down

0 comments on commit 6b6f9b3

Please sign in to comment.