vuejs emit an event through a function code example Example: how to emit a function in vue this.$emit('myEvent')