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
c06dd8e2
authored
May 26, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【优化】Image Task 使用 card 组件
parent
4542337f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
44 deletions
+22
-44
src/views/ai/image/ImageTask.vue
+22
-44
No files found.
src/views/ai/image/ImageTask.vue
View file @
c06dd8e2
...
@@ -2,22 +2,7 @@
...
@@ -2,22 +2,7 @@
<
template
>
<
template
>
<el-card
class=
"dr-task"
body-class=
"task-card"
shadow=
"never"
>
<el-card
class=
"dr-task"
body-class=
"task-card"
shadow=
"never"
>
<template
#
header
>
绘画任务
</
template
>
<template
#
header
>
绘画任务
</
template
>
<ImageTaskCard
v-for=
"image in imageList"
:key=
"image"
:image-detail=
"image"
/>
<el-card
body-class=
""
class=
"image-card"
>
<div
class=
"image-operation"
>
<div>
<el-button
type=
""
text
bg
>
已完成
</el-button>
</div>
<div>
<el-button
class=
"btn"
text
:icon=
"Download"
/>
<el-button
class=
"btn"
text
:icon=
"Delete"
/>
<el-button
class=
"btn"
text
:icon=
"More"
@
click=
"handlerTaskDetail"
/>
</div>
</div>
<div
class=
"image-wrapper"
>
<img
class=
"image"
src=
"https://img.bigpt8.com/uploads/thumbnail/20240509/b7802797e5f709f35a451a1591d4d495.png"
/>
</div>
</el-card>
</el-card>
</el-card>
<!-- 图片 detail 抽屉 -->
<!-- 图片 detail 抽屉 -->
<ImageDetailDrawer
<ImageDetailDrawer
...
@@ -26,10 +11,13 @@
...
@@ -26,10 +11,13 @@
/>
/>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ImageApi
,
ImageDetailVO
}
from
'@/api/ai/image'
;
import
ImageDetailDrawer
from
'./ImageDetailDrawer.vue'
import
ImageDetailDrawer
from
'./ImageDetailDrawer.vue'
import
ImageTaskCard
from
'./ImageTaskCard.vue'
import
{
Delete
,
Download
,
More
}
from
"@element-plus/icons-vue"
;
import
{
Delete
,
Download
,
More
}
from
"@element-plus/icons-vue"
;
import
{
bool
}
from
"vue-types"
;
import
{
bool
}
from
"vue-types"
;
const
imageList
=
ref
<
ImageDetailVO
[]
>
([])
// image 列表
const
showTaskDetail
=
ref
<
bool
>
(
false
)
// 是否显示 task 详情
const
showTaskDetail
=
ref
<
bool
>
(
false
)
// 是否显示 task 详情
/**
/**
...
@@ -40,13 +28,30 @@ const handlerTaskDetail = async () => {
...
@@ -40,13 +28,30 @@ const handlerTaskDetail = async () => {
}
}
/**
/**
* 抽屉 -
关闭
* 抽屉 -
close
*/
*/
const
handlerDrawerClose
=
async
()
=>
{
const
handlerDrawerClose
=
async
()
=>
{
showTaskDetail
.
value
=
false
showTaskDetail
.
value
=
false
}
}
/**
* 任务 - detail
*/
const
handlerDrawerOpen
=
async
()
=>
{
showTaskDetail
.
value
=
true
}
/**
* 获取 - image 列表
*/
const
getImageList
=
async
()
=>
{
imageList
.
value
=
await
ImageApi
.
getImageList
({
pageNo
:
1
,
pageSize
:
20
})
}
//
onMounted
(
async
()
=>
{
await
getImageList
()
})
</
script
>
</
script
>
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
...
@@ -60,32 +65,5 @@ const handlerDrawerClose = async () => {
...
@@ -60,32 +65,5 @@ const handlerDrawerClose = async () => {
}
}
}
}
.image-card
{
width
:
360px
;
border-radius
:
10px
;
.image-operation
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
.btn
{
//
border
:
1px
solid
red
;
padding
:
10px
;
margin
:
0
;
}
}
.image-wrapper
{
overflow
:
hidden
;
margin-top
:
20px
;
.image
{
width
:
100%
;
border-radius
:
10px
;
}
}
}
</
style
>
</
style
>
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