Skip to content

Commit 71b3dad

Browse files
feat: 🎸 clipper-upload accept rest props as input attrs
1 parent b9e40a2 commit 71b3dad

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

‎README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -447,10 +447,11 @@ use `v-model` binding data with `clipper-upload`
447447

448448
* Props
449449

450+
Props that are not defined below will apply to the file input as attributes, for example: `accept`, `id` and `name`.
451+
450452
| Prop|Type|default|description |
451453
|-|-:|-:|:-|
452454
|check|boolean|true|Check if upload file is an image. If set to `true`, when upload files that are not images, it will do nothing, so you will not get an error event on clipping component.|
453-
|accept|string|'*'|Bind `accept` attribute to file input tag.|
454455
|exif|boolean|true|Transform EXIF image to correct orientation when uploading.|
455456

456457
* Event

‎src/components/clipper-upload.vue

+1-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<input
1010
type="file"
1111
class="upload"
12-
:accept="accept"
1312
style="display:none"
13+
v-bind="$attrs"
1414
@change="upload($event)"
1515
@click="clear($event)"
1616
>
@@ -22,10 +22,6 @@ import exif from 'exif-js'
2222
2323
export default {
2424
props: {
25-
accept: {
26-
type: String,
27-
default: '*'
28-
},
2925
exif: {
3026
type: Boolean,
3127
default: true

0 commit comments

Comments
 (0)