Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $ npm install vue-uploadcare
```html
<template>
<div>
<VueUploadcare :url.sync="photoUrl"></VueUploadcare>
<VueUploadcare :url.sync="photoUrl" images-only="true"></VueUploadcare>
</div>
</template>

Expand All @@ -31,4 +31,4 @@ $ npm install vue-uploadcare
},
components: { VueUploadcare }
}
</script>
</script>
7 changes: 5 additions & 2 deletions vue-uploadcare.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<input type="hidden">
<input type="hidden" v-bind:data-images-only="imagesOnly">
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use shorthand, please. Example: :data-images-only="imagesOnly".
Docs: https://vuejs.org/v2/api/#v-bind

</template>

<script>
Expand All @@ -9,6 +9,9 @@
props: {
url: {
required: true
},
imagesOnly: {
required: false
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Required has false by default. You may write: ```imagesOnly: Boolean````

}
},
data() {
Expand Down Expand Up @@ -48,4 +51,4 @@
}
}
};
</script>
</script>