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
990093c0
authored
Jun 18, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【优化】生成内容按钮增加 二次确认
parent
27d7fe48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
src/views/ai/image/dall3/index.vue
+4
-0
src/views/ai/image/midjourney/index.vue
+6
-3
No files found.
src/views/ai/image/dall3/index.vue
View file @
990093c0
...
@@ -121,6 +121,8 @@ const drawIn = ref<boolean>(false) // 生成中
...
@@ -121,6 +121,8 @@ const drawIn = ref<boolean>(false) // 生成中
const
selectHotWord
=
ref
<
string
>
(
''
)
// 选中的热词
const
selectHotWord
=
ref
<
string
>
(
''
)
// 选中的热词
const
hotWords
=
ref
<
string
[]
>
([
'中国旗袍'
,
'古装美女'
,
'卡通头像'
,
'机甲战士'
,
'童话小屋'
,
'中国长城'
])
// 热词
const
hotWords
=
ref
<
string
[]
>
([
'中国旗袍'
,
'古装美女'
,
'卡通头像'
,
'机甲战士'
,
'童话小屋'
,
'中国长城'
])
// 热词
const
selectModel
=
ref
<
any
>
({})
// 模型
const
selectModel
=
ref
<
any
>
({})
// 模型
// message
const
message
=
useMessage
()
// TODO @fan:image 改成项目里自己的哈
// TODO @fan:image 改成项目里自己的哈
// TODO @fan:这个 image,要不看看网上有没合适的图片,作为占位符,啊哈哈
// TODO @fan:这个 image,要不看看网上有没合适的图片,作为占位符,啊哈哈
const
models
=
ref
<
ImageModelVO
[]
>
([
const
models
=
ref
<
ImageModelVO
[]
>
([
...
@@ -228,6 +230,8 @@ const handlerSizeClick = async (imageSize: ImageSizeVO) => {
...
@@ -228,6 +230,8 @@ const handlerSizeClick = async (imageSize: ImageSizeVO) => {
/** 图片生产 */
/** 图片生产 */
const
handlerGenerateImage
=
async
()
=>
{
const
handlerGenerateImage
=
async
()
=>
{
// 二次确认
await
message
.
confirm
(
`确认生成内容?`
)
try
{
try
{
// 加载中
// 加载中
drawIn
.
value
=
true
drawIn
.
value
=
true
...
...
src/views/ai/image/midjourney/index.vue
View file @
990093c0
...
@@ -97,7 +97,8 @@
...
@@ -97,7 +97,8 @@
// image 模型
// image 模型
import
{
ImageApi
,
ImageMidjourneyImagineReqVO
}
from
"@/api/ai/image"
;
import
{
ImageApi
,
ImageMidjourneyImagineReqVO
}
from
"@/api/ai/image"
;
// message
const
message
=
useMessage
()
// 定义 emits
// 定义 emits
const
emits
=
defineEmits
([
'onDrawStart'
,
'onDrawComplete'
])
const
emits
=
defineEmits
([
'onDrawStart'
,
'onDrawComplete'
])
...
@@ -196,8 +197,8 @@ const midjourneyVersionList = ref<any>([
...
@@ -196,8 +197,8 @@ const midjourneyVersionList = ref<any>([
])
])
const
nijiVersionList
=
ref
<
any
>
([
const
nijiVersionList
=
ref
<
any
>
([
{
{
value
:
'5
.0
'
,
value
:
'5'
,
label
:
'v5
.0
'
,
label
:
'v5'
,
},
},
])
])
const
selectVersion
=
ref
<
any
>
(
'6.0'
)
// 选中的 version
const
selectVersion
=
ref
<
any
>
(
'6.0'
)
// 选中的 version
...
@@ -246,6 +247,8 @@ const handlerChangeVersion = async (version) => {
...
@@ -246,6 +247,8 @@ const handlerChangeVersion = async (version) => {
/** 图片生产 */
/** 图片生产 */
const
handlerGenerateImage
=
async
()
=>
{
const
handlerGenerateImage
=
async
()
=>
{
// 二次确认
await
message
.
confirm
(
`确认生成内容?`
)
// todo @范 图片生产逻辑
// todo @范 图片生产逻辑
try
{
try
{
// 回调
// 回调
...
...
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