mirror of
https://github.com/dataease/dataease.git
synced 2026-05-16 05:50:45 +08:00
Merge pull request #11255 from dataease/pr@dev-v2@refactor_bus
refactor: 优化总线销毁条件,防止同名事件被意外销毁情况
This commit is contained in:
@@ -13,7 +13,7 @@ export const useEmitt = (option?: Option) => {
|
||||
emitter.on(option.name, option.callback)
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
emitter.off(option.name)
|
||||
emitter.off(option.name, option.callback)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user