【增加】mj 增加参考图

pull/470/MERGE
cherishsince 2024-07-03 20:21:08 +08:00
parent 0e755acf52
commit 5c560e2fbe
1 changed files with 11 additions and 1 deletions

View File

@ -88,6 +88,14 @@
</div> </div>
</el-space> </el-space>
</div> </div>
<div class="model">
<div>
<el-text tag="b">参考图</el-text>
</div>
<el-space wrap class="model-list">
<UploadImg v-model="referImage" height="80px" width="80px" />
</el-space>
</div>
<div class="btns"> <div class="btns">
<!-- <el-button size="large" round>重置内容</el-button>--> <!-- <el-button size="large" round>重置内容</el-button>-->
<el-button type="primary" size="large" round @click="handlerGenerateImage"></el-button> <el-button type="primary" size="large" round @click="handlerGenerateImage"></el-button>
@ -118,6 +126,7 @@ interface ImageSizeVO {
// //
const prompt = ref<string>('') // const prompt = ref<string>('') //
const referImage = ref<any>() //
const selectHotWord = ref<string>('') // const selectHotWord = ref<string>('') //
const hotWords = ref<string[]>(['中国旗袍', '古装美女', '卡通头像', '机甲战士', '童话小屋', '中国长城']) // const hotWords = ref<string[]>(['中国旗袍', '古装美女', '卡通头像', '机甲战士', '童话小屋', '中国长城']) //
const selectModel = ref<any>() // const selectModel = ref<any>() //
@ -247,6 +256,7 @@ const handlerGenerateImage = async () => {
await message.confirm(`确认生成内容?`) await message.confirm(`确认生成内容?`)
// todo @ // todo @
try { try {
console.log('referImage.value', referImage.value)
// //
emits('onDrawStart', selectModel.value.key) emits('onDrawStart', selectModel.value.key)
// //
@ -256,7 +266,7 @@ const handlerGenerateImage = async () => {
width: selectImageSize.value.width, width: selectImageSize.value.width,
height: selectImageSize.value.height, height: selectImageSize.value.height,
version: selectVersion.value, version: selectVersion.value,
base64Array: [], referImageUrl: referImage.value,
} as ImageMidjourneyImagineReqVO } as ImageMidjourneyImagineReqVO
await ImageApi.midjourneyImagine(req) await ImageApi.midjourneyImagine(req)
} finally { } finally {