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
29e1426a
authored
Jun 04, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【增加】Image midjourney 增加 click 事件
parent
1be7713f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
src/api/ai/image/index.ts
+8
-0
src/views/ai/image/ImageTask.vue
+8
-2
No files found.
src/api/ai/image/index.ts
View file @
29e1426a
...
@@ -15,10 +15,18 @@ export interface ImageDetailVO {
...
@@ -15,10 +15,18 @@ export interface ImageDetailVO {
model
:
string
// 模型
model
:
string
// 模型
style
:
string
// 图像生成的风格
style
:
string
// 图像生成的风格
size
:
string
// 图片尺寸
size
:
string
// 图片尺寸
buttons
:
ImageMjButtonsVO
[]
// mj 操作按钮
createTime
:
string
// 创建时间
createTime
:
string
// 创建时间
updateTime
:
string
// 更新事件
updateTime
:
string
// 更新事件
}
}
export
interface
ImageMjButtonsVO
{
customId
:
string
// MJ::JOB::upsample::1::85a4b4c1-8835-46c5-a15c-aea34fad1862 动作标识
emoji
:
string
// 图标 emoji
label
:
string
// Make Variations 文本
style
:
number
// 样式: 2(Primary)、3(Green)
}
export
interface
ImagePageReqVO
{
export
interface
ImagePageReqVO
{
pageNo
:
number
// 分页编号
pageNo
:
number
// 分页编号
pageSize
:
number
// 分页大小
pageSize
:
number
// 分页大小
...
...
src/views/ai/image/ImageTask.vue
View file @
29e1426a
...
@@ -5,7 +5,8 @@
...
@@ -5,7 +5,8 @@
v-for=
"image in imageList"
v-for=
"image in imageList"
:key=
"image"
:key=
"image"
:image-detail=
"image"
:image-detail=
"image"
@
on-btn-click=
"handlerImageBtnClick"
/>
@
on-btn-click=
"handlerImageBtnClick"
@
on-mj-btn-click=
"handlerImageMjBtnClick"
/>
</el-card>
</el-card>
<!-- 图片 detail 抽屉 -->
<!-- 图片 detail 抽屉 -->
<ImageDetailDrawer
<ImageDetailDrawer
...
@@ -15,7 +16,7 @@
...
@@ -15,7 +16,7 @@
/>
/>
</template>
</template>
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
ImageApi
,
ImageDetailVO
}
from
'@/api/ai/image'
;
import
{
ImageApi
,
ImageDetailVO
,
ImageMjButtonsVO
}
from
'@/api/ai/image'
;
import
ImageDetailDrawer
from
'./ImageDetailDrawer.vue'
import
ImageDetailDrawer
from
'./ImageDetailDrawer.vue'
import
ImageTaskCard
from
'./ImageTaskCard.vue'
import
ImageTaskCard
from
'./ImageTaskCard.vue'
...
@@ -61,6 +62,11 @@ const handlerImageBtnClick = async (type, imageDetail: ImageDetailVO) => {
...
@@ -61,6 +62,11 @@ const handlerImageBtnClick = async (type, imageDetail: ImageDetailVO) => {
}
}
}
}
/** 图片 - mj btn click */
const
handlerImageMjBtnClick
=
async
(
button
:
ImageMjButtonsVO
)
=>
{
console
.
log
(
'mj click'
,
button
)
}
/** 下载 - image */
/** 下载 - image */
// TODO @fan:貌似可以考虑抽到 download 里面,作为一个方法
// TODO @fan:貌似可以考虑抽到 download 里面,作为一个方法
const
downloadImage
=
async
(
imageUrl
)
=>
{
const
downloadImage
=
async
(
imageUrl
)
=>
{
...
...
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