Skip to content

Commit 616fe2c

Browse files
committed
【优化】midjourney 模型默认选中一个模型
1 parent d1be899 commit 616fe2c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/views/ai/image/midjourney/index.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ interface ImageSizeVO {
7777
7878
// 定义属性
7979
const prompt = ref<string>('') // 提示词
80-
const selectHotWord = ref<string>('midjourney') // 选中的热词
80+
const selectHotWord = ref<string>('') // 选中的热词
8181
const hotWords = ref<string[]>(['中国旗袍', '古装美女', '卡通头像', '机甲战士', '童话小屋', '中国长城']) // 热词
8282
const selectModel = ref<any>() // 选中的热词
8383
const models = ref<ImageModelVO[]>([
@@ -92,6 +92,7 @@ const models = ref<ImageModelVO[]>([
9292
image: 'https://bigpt8.com/pc/_nuxt/nj.ca79b143.png',
9393
},
9494
]) // 模型
95+
selectModel.value = models.value[0] // 默认选中
9596
9697
// 定义 Props
9798
const props = defineProps({})
@@ -115,10 +116,6 @@ const handlerHotWordClick = async (hotWord: string) => {
115116
* 模型 - click
116117
*/
117118
const handlerModelClick = async (model: ImageModelVO) => {
118-
if (selectModel.value === model) {
119-
selectModel.value = {} as ImageModelVO
120-
return
121-
}
122119
selectModel.value = model
123120
}
124121

0 commit comments

Comments
 (0)