We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c96f3ce commit 520244eCopy full SHA for 520244e
src/views/ai/image/ImageTask.vue
@@ -87,9 +87,10 @@ const downloadImage = async (imageUrl) => {
87
}
88
89
90
-//
+/** 暴露组件方法 */
91
defineExpose({getImageList})
92
+
93
+/** 组件挂在的时候 */
94
onMounted(async () => {
95
// 获取 image 列表
96
await getImageList()
@@ -98,9 +99,12 @@ onMounted(async () => {
98
99
100
}, 1000 * 20)
101
})
102
-onUnmounted(async () => {
103
+/** 组件取消挂在的时候 */
104
+onUnmounted(async () => {
105
+ if (imageListInterval.value) {
106
+ clearInterval(imageListInterval.value)
107
+ }
108
109
</script>
110
0 commit comments