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:
parent
ab443e0a19
commit
d45a2fb479
@ -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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user