Powiadomienia
Wyczyść wszystko
BugOverflow
1
Wpisy
1
Użytkownicy
0
Reactions
776
Widoki
0
26/05/2023 11:36 pm
Rozpoczynający temat
example
1 odpowiedź
0
26/05/2023 11:39 pm
Rozpoczynający temat
1. It's not possible in easy way. Read more here.
2. Use https://github.com/developit/mitt as separated event's lib.
Example code:
Emitter:
methods: { TestEmit() { this.emitter.emit('foo', { a: 'b' }) } }
Reciever:
mounted() { this.emitter.on('foo', e => console.log('test ok!', e) },