-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed
Labels
Description
Version
2.5.2
Reproduction link
https://jsfiddle.net/CHENGKANG/4owjvLLk/5/
Steps to reproduce
- Add multiple custom event listeners
this.$on(['event1', 'event2'], () => {
console.log('This is callback.')
})
- Try to remove them with
vm.$off
this.$off(['event1', 'event2'])
- Try to emit the removed events
this.$emit('event1')
What is expected?
Nothing should happen because the event listeners should have been removed.
What is actually happening?
Got "This is callback."
printed in the console, which means that the event listeners are not removed as expected.
Please check my post in Vue forum for more details.