I'm trying to get the content of a $event.emit, as below. In the first console.log, inside the function comes the content. Leaving the function, not the console.log of the variable.
mounted () {
this.$events.on('emitEvent', function (eventData) {
this.line = _.cloneDeep(eventData)
console.log('1', this.line)
})
console.log('2', this.line)
}
I am using this package for event handling.