0👍
You need to pass the specific id of the element on which you want to perform the action.
new Vue({
el: '#app', // id of element
data: {
message: 'Hello Vue.js!'
},
methods: {
trigger () {
this.$refs.fileInput.click()
}
}
})
You can check the JS Fiddle link
Source:stackexchange.com