fix:onShow 重复触发时先 off 再 on,避免事件监听累积
This commit is contained in:
@@ -321,6 +321,8 @@ const handleTagLibraryUpdated = (payload) => {
|
||||
}
|
||||
|
||||
onShow(() => {
|
||||
// 防止 onShow 多次触发导致重复注册
|
||||
uni.$off('tag-library-updated', handleTagLibraryUpdated)
|
||||
uni.$on('tag-library-updated', handleTagLibraryUpdated)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user