fix: remove assetLiked event listener on unmount to prevent memory leak

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
zheng020 2026-05-28 12:59:30 +08:00
parent ab443e0a19
commit d45a2fb479

View File

@ -90,7 +90,7 @@
</template>
<script setup>
import { ref, computed, onMounted } from 'vue'
import { ref, computed, onMounted, onUnmounted } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { getHotInspirationFlowMoreApi } from '@/utils/api.js'
@ -231,6 +231,10 @@ onMounted(() => {
}
})
})
onUnmounted(() => {
uni.$off('assetLiked')
})
</script>
<style scoped>