【增加】midjourney 增加版本号设置

This commit is contained in:
cherishsince 2024-05-31 14:25:16 +08:00
parent 3c4327e4dd
commit 9bd8d8e9cb
2 changed files with 67 additions and 0 deletions

View File

@ -48,6 +48,7 @@ export interface ImageMidjourneyImagineReqVO {
base64Array: string[] // size不能为空
width: string // 图片宽度
height: string // 图片高度
version: string // 版本
}
// TODO 芋艿review 下整体注释、方法名

View File

@ -46,6 +46,28 @@
</div>
</el-space>
</div>
<div class="version">
<div>
<el-text tag="b">版本</el-text>
</div>
<el-space wrap class="version-list">
<el-select
v-model="selectVersion"
class="version-select"
clearable
placeholder="请选择版本"
style="width: 350px"
@change="handlerChangeVersion"
>
<el-option
v-for="item in versionList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-space>
</div>
<div class="model">
<div>
<el-text tag="b">模型</el-text>
@ -147,6 +169,32 @@ const imageSizeList = ref<ImageSizeVO[]>([
]) // size
selectImageSize.value = imageSizeList.value[0]
// version
const versionList = ref<any>([
{
value: '6.0',
label: 'v6.0',
},
{
value: '5.2',
label: 'v5.2',
},
{
value: '5.1',
label: 'v5.1',
},
{
value: '5.0',
label: 'v5.0',
},
{
value: '4.0',
label: 'v4.0',
},
]) // version
const selectVersion = ref<any>('6.0') // version
// Props
const props = defineProps({})
@ -183,6 +231,13 @@ const handlerModelClick = async (model: ImageModelVO) => {
selectModel.value = model
}
/**
* version - click
*/
const handlerChangeVersion = async (version) => {
console.log('version', version)
}
/**
* 图片生产
*/
@ -197,6 +252,7 @@ const handlerGenerateImage = async () => {
model: selectModel.value.key,
width: selectImageSize.value.width,
height: selectImageSize.value.height,
version: selectVersion.value,
base64Array: [],
} as ImageMidjourneyImagineReqVO
await ImageApi.midjourneyImagine(req)
@ -231,6 +287,16 @@ const handlerGenerateImage = async () => {
}
}
// version
.version {
margin-top: 20px;
.version-list {
margin-top: 20px;
width: 100%;
}
}
//
.model {
margin-top: 30px;