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
05ba908a
authored
Jun 18, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【增加】增加 loading
parent
8db7c7d9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
src/views/ai/image/ImageTask.vue
+10
-1
No files found.
src/views/ai/image/ImageTask.vue
View file @
05ba908a
...
...
@@ -22,6 +22,7 @@
import
{
ImageApi
,
ImageDetailVO
,
ImageMjActionVO
,
ImageMjButtonsVO
}
from
'@/api/ai/image'
;
import
ImageDetailDrawer
from
'./ImageDetailDrawer.vue'
import
ImageTaskCard
from
'./ImageTaskCard.vue'
import
{
ElLoading
}
from
"element-plus"
;
const
message
=
useMessage
()
// 消息弹窗
...
...
@@ -30,6 +31,7 @@ const imageListInterval = ref<any>() // image 列表定时器,刷新列表
const
isShowImageDetail
=
ref
<
boolean
>
(
false
)
// 是否显示 task 详情
const
showImageDetailId
=
ref
<
number
>
(
0
)
// 是否显示 task 详情
const
imageTaskRef
=
ref
<
any
>
()
// ref
const
imageTaskLoadingInstance
=
ref
<
any
>
()
// loading
const
imageTaskLoading
=
ref
<
boolean
>
(
false
)
// loading
const
pageNo
=
ref
<
number
>
(
1
)
// page no
const
pageSize
=
ref
<
number
>
(
20
)
// page size
...
...
@@ -50,10 +52,17 @@ const handlerDrawerOpen = async () => {
const
getImageList
=
async
()
=>
{
imageTaskLoading
.
value
=
true
try
{
imageTaskLoadingInstance
.
value
=
ElLoading
.
service
({
target
:
imageTaskRef
.
value
,
text
:
'加载中...'
})
const
{
list
}
=
await
ImageApi
.
getImageList
({
pageNo
:
pageNo
.
value
,
pageSize
:
pageSize
.
value
})
imageList
.
value
.
push
.
apply
(
imageList
.
value
,
list
)
}
finally
{
imageTaskLoading
.
value
=
false
if
(
imageTaskLoadingInstance
.
value
)
{
imageTaskLoadingInstance
.
value
.
close
();
imageTaskLoadingInstance
.
value
=
null
;
}
}
}
...
...
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