How Event Handling works in Vue.js