You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
760 B
33 lines
760 B
<template>
|
|
<input
|
|
type="file"
|
|
:name="$parent.name"
|
|
:id="$parent.inputId || $parent.name"
|
|
:accept="$parent.accept"
|
|
:capture="$parent.capture"
|
|
@change="change"
|
|
:webkitdirectory="$parent.directory && $parent.features.directory"
|
|
:directory="$parent.directory && $parent.features.directory"
|
|
:multiple="$parent.multiple && $parent.features.html5"
|
|
/>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
methods: {
|
|
change(e) {
|
|
this.$parent.addInputFile(e.target)
|
|
e.target.value = ''
|
|
if (!e.target.files) {
|
|
// ie9 fix #219
|
|
this.$destroy()
|
|
// eslint-disable-next-line
|
|
new this.constructor({
|
|
parent: this.$parent,
|
|
el: this.$el,
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|