feat: example for bus hook

This commit is contained in:
2025-09-15 08:31:15 +08:00
parent 85041b4173
commit cdbd52041b
2 changed files with 16 additions and 0 deletions

View File

View 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,
};