various improvements
This commit is contained in:
18
plugins/mitt.ts
Normal file → Executable file
18
plugins/mitt.ts
Normal file → Executable file
@@ -1,12 +1,12 @@
|
||||
import mitt from 'mitt'
|
||||
import mitt from 'mitt';
|
||||
|
||||
export default defineNuxtPlugin(() => {
|
||||
const emitter = mitt()
|
||||
const emitter = mitt();
|
||||
|
||||
return {
|
||||
provide: {
|
||||
emit: emitter.emit, // Will emit an event
|
||||
listen: emitter.on // Will register a listener for an event
|
||||
}
|
||||
}
|
||||
})
|
||||
return {
|
||||
provide: {
|
||||
emit: emitter.emit, // Will emit an event
|
||||
listen: emitter.on // Will register a listener for an event
|
||||
}
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user