v on click call emit function vue code example Example: how to emit a function in vue this.$emit('myEvent')