feat: example for bus hook
This commit is contained in:
16
src/hooks/bus/changeUserBus.ts
Normal file
16
src/hooks/bus/changeUserBus.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { createEventHook } from "@vueuse/core";
|
||||
|
||||
export interface ChangeUserBus {
|
||||
token: string;
|
||||
}
|
||||
|
||||
export const changeUserEvent = createEventHook<ChangeUserBus>();
|
||||
|
||||
/**
|
||||
* This is an example, please remove if not needed
|
||||
*/
|
||||
export const changeUserBus = {
|
||||
emit: changeUserEvent.emit,
|
||||
on: changeUserEvent.on,
|
||||
off: changeUserEvent.off,
|
||||
};
|
||||
Reference in New Issue
Block a user