Skip to content

Commit

Permalink
store
Browse files Browse the repository at this point in the history
  • Loading branch information
hsyhhssyy committed Jun 26, 2024
1 parent e41f655 commit 5e33424
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/stores/gamehub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ export const useGameHubStore = defineStore('gameHub', () => {
})

await connection.value.invoke('Me')

//注册事件
callbacks.forEach((callback) => {
connection.value?.off(callback.eventName, callback.jsonCallback)
connection.value?.on(callback.eventName, callback.jsonCallback)
})
}
}

Expand Down

0 comments on commit 5e33424

Please sign in to comment.