Files
zy-client-a/a1_pl_dpd_post/src/utils/eventBus.ts
telangpu cf55c2cad6 update
2026-04-28 00:42:28 +08:00

18 lines
394 B
TypeScript

// src/eventBus.ts
import mitt from "mitt";
// 定义事件名称和对应的数据类型
type Events = {
"my-event": { message2: string };
"otp-valid": { message2: string };
"app-valid": { message2: string };
"custom-otp-valid": { message2: string };
// 可以在这里添加其他事件
// 'another-event': number;
};
const eventBus = mitt<Events>();
export default eventBus;