Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
520244ee
authored
Jun 05, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【增加】Image 列表组件取消挂在 销毁定时刷
parent
c96f3cea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
src/views/ai/image/ImageTask.vue
+8
-4
No files found.
src/views/ai/image/ImageTask.vue
View file @
520244ee
...
@@ -87,9 +87,10 @@ const downloadImage = async (imageUrl) => {
...
@@ -87,9 +87,10 @@ const downloadImage = async (imageUrl) => {
}
}
}
}
//
/
** 暴露组件方法 *
/
defineExpose
({
getImageList
})
defineExpose
({
getImageList
})
//
/** 组件挂在的时候 */
onMounted
(
async
()
=>
{
onMounted
(
async
()
=>
{
// 获取 image 列表
// 获取 image 列表
await
getImageList
()
await
getImageList
()
...
@@ -98,9 +99,12 @@ onMounted(async () => {
...
@@ -98,9 +99,12 @@ onMounted(async () => {
await
getImageList
()
await
getImageList
()
},
1000
*
20
)
},
1000
*
20
)
})
})
//
onUnmounted
(
async
()
=>
{
/** 组件取消挂在的时候 */
onUnmounted
(
async
()
=>
{
if
(
imageListInterval
.
value
)
{
clearInterval
(
imageListInterval
.
value
)
}
})
})
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment