Spaces:
Sleeping
Sleeping
File size: 486 Bytes
6e41657 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import { type EventBusKey, useEventBus } from '@vueuse/core';
const accountEventKey: EventBusKey<string> = Symbol('account-event');
// 统一的账号相关事件,用于不同组件之间同步状态
type AccountEvent = 'account-added' | 'account-removed';
interface AccountEventPayload {
fakeid: string;
}
export default () => {
const accountEventBus = useEventBus<AccountEvent, AccountEventPayload>(accountEventKey);
return {
accountEventBus,
};
};
|