Please see these two code snippets, they all output the same results:
<template>
<input type="file" @input="input" />
</template>
<script>
export default {
methods: {
input(event) {
console.log(event.target.files);
},
},
};
</script>
<template>
<input type="file" @change="change" />
</template>
<script>
export default {
methods: {
change(event) {
console.log(event.target.files);
},
},
};
</script>
Is there any difference between @input and @change event in <input type="file" /> element?