mirror of
https://github.com/dataease/dataease.git
synced 2026-05-18 01:38:11 +08:00
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