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
616fe2c3
authored
May 30, 2024
by
cherishsince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【优化】midjourney 模型默认选中一个模型
parent
d1be8991
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
src/views/ai/image/midjourney/index.vue
+2
-5
No files found.
src/views/ai/image/midjourney/index.vue
View file @
616fe2c3
...
@@ -77,7 +77,7 @@ interface ImageSizeVO {
...
@@ -77,7 +77,7 @@ interface ImageSizeVO {
// 定义属性
// 定义属性
const
prompt
=
ref
<
string
>
(
''
)
// 提示词
const
prompt
=
ref
<
string
>
(
''
)
// 提示词
const
selectHotWord
=
ref
<
string
>
(
'
midjourney
'
)
// 选中的热词
const
selectHotWord
=
ref
<
string
>
(
''
)
// 选中的热词
const
hotWords
=
ref
<
string
[]
>
([
'中国旗袍'
,
'古装美女'
,
'卡通头像'
,
'机甲战士'
,
'童话小屋'
,
'中国长城'
])
// 热词
const
hotWords
=
ref
<
string
[]
>
([
'中国旗袍'
,
'古装美女'
,
'卡通头像'
,
'机甲战士'
,
'童话小屋'
,
'中国长城'
])
// 热词
const
selectModel
=
ref
<
any
>
()
// 选中的热词
const
selectModel
=
ref
<
any
>
()
// 选中的热词
const
models
=
ref
<
ImageModelVO
[]
>
([
const
models
=
ref
<
ImageModelVO
[]
>
([
...
@@ -92,6 +92,7 @@ const models = ref<ImageModelVO[]>([
...
@@ -92,6 +92,7 @@ const models = ref<ImageModelVO[]>([
image
:
'https://bigpt8.com/pc/_nuxt/nj.ca79b143.png'
,
image
:
'https://bigpt8.com/pc/_nuxt/nj.ca79b143.png'
,
},
},
])
// 模型
])
// 模型
selectModel
.
value
=
models
.
value
[
0
]
// 默认选中
// 定义 Props
// 定义 Props
const
props
=
defineProps
({})
const
props
=
defineProps
({})
...
@@ -115,10 +116,6 @@ const handlerHotWordClick = async (hotWord: string) => {
...
@@ -115,10 +116,6 @@ const handlerHotWordClick = async (hotWord: string) => {
* 模型 - click
* 模型 - click
*/
*/
const
handlerModelClick
=
async
(
model
:
ImageModelVO
)
=>
{
const
handlerModelClick
=
async
(
model
:
ImageModelVO
)
=>
{
if
(
selectModel
.
value
===
model
)
{
selectModel
.
value
=
{}
as
ImageModelVO
return
}
selectModel
.
value
=
model
selectModel
.
value
=
model
}
}
...
...
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