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
11ec263a
authored
May 28, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【优化】处理抽屉中 绘画中的图片不能展示加载状态
parent
bbf7956f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
src/views/ai/image/ImageDetailDrawer.vue
+0
-1
src/views/ai/image/ImageTaskCard.vue
+15
-6
No files found.
src/views/ai/image/ImageDetailDrawer.vue
View file @
11ec263a
...
...
@@ -112,7 +112,6 @@ watch(show, async (newValue, oldValue) => {
// watch id
const
{
id
}
=
toRefs
(
props
)
watch
(
id
,
async
(
newVal
,
oldVal
)
=>
{
console
.
log
(
'newVal'
,
newVal
)
if
(
newVal
)
{
await
getImageDetail
(
newVal
)
}
...
...
src/views/ai/image/ImageTaskCard.vue
View file @
11ec263a
...
...
@@ -41,12 +41,8 @@ const handlerBtnClick = async (type, imageDetail: ImageDetailVO) => {
emits
(
'onBtnClick'
,
type
,
imageDetail
)
}
// emits
const
emits
=
defineEmits
([
'onBtnClick'
])
//
onMounted
(
async
()
=>
{
if
(
props
.
imageDetail
.
status
===
'in_progress'
)
{
const
handlerLoading
=
async
(
status
:
string
)
=>
{
if
(
status
===
'in_progress'
)
{
cardImageLoadingInstance
.
value
=
ElLoading
.
service
({
target
:
cardImageRef
.
value
,
text
:
'生成中...'
...
...
@@ -57,6 +53,19 @@ onMounted(async () => {
cardImageLoadingInstance
.
value
=
null
;
}
}
}
// watch
const
{
imageDetail
}
=
toRefs
(
props
)
watch
(
imageDetail
,
async
(
newVal
,
oldVal
)
=>
{
await
handlerLoading
(
newVal
.
status
as
string
)
})
// emits
const
emits
=
defineEmits
([
'onBtnClick'
])
//
onMounted
(
async
()
=>
{
await
handlerLoading
(
props
.
imageDetail
.
status
as
string
)
})
</
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