feat: 修改多次绑定on事件

This commit is contained in:
duan
2025-02-28 18:14:29 +08:00
parent 03062abfe7
commit ad52c6bbf9
4 changed files with 19 additions and 7 deletions

View File

@@ -84,6 +84,12 @@ const myDialogRef = ref(null)
const ruleFormRef = ref(null)
onMounted(() => {
getList()
eventBus.on('search', (res) => {
getList(res)
})
})
onBeforeUnmount(() => {
eventBus.off('search')
})
eventBus.on('search', (res) => {
getList(res)