feat:【ele】【ai】image 全部实现

This commit is contained in:
YunaiV
2025-11-15 15:51:21 +08:00
parent 104be22d0d
commit 23fd82b31b
8 changed files with 24 additions and 30 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

View File

@@ -194,30 +194,21 @@ defineExpose({ settingValues });
<div>
<b>图片尺寸</b>
</div>
<ElSpace wrap class="mt-4 flex flex-wrap gap-x-5">
<!-- TODO @AI是不是可以 ElInputNumber 里面另外高在一行里 <template #prepend>Http://</template><template #append>.com</template>
-->
<div class="flex items-center gap-2">
<span></span>
<ElInputNumber
v-model="width"
placeholder="图片宽度"
controls-position="right"
class="!w-32"
/>
<span>px</span>
</div>
<div class="flex items-center gap-2">
<span></span>
<ElInputNumber
v-model="height"
placeholder="图片高度"
controls-position="right"
class="!w-32"
/>
<span>px</span>
</div>
</ElSpace>
<div class="mt-4 flex items-center gap-2">
<ElInputNumber
v-model="width"
placeholder="图片宽度"
controls-position="right"
class="!w-32"
/>
<span class="mx-2">×</span>
<ElInputNumber
v-model="height"
placeholder="图片高度"
controls-position="right"
class="!w-32"
/>
</div>
</div>
<div class="mt-12 flex justify-center">

View File

@@ -182,13 +182,13 @@ defineExpose({ settingValues });
]"
v-for="model in Dall3Models"
:key="model.key"
@click="handleModelClick(model)"
>
<!-- TODO @AI图片无法展示 -->
<ElImage
:preview-src-list="[]"
:src="model.image"
fit="contain"
@click="handleModelClick(model)"
class="w-full"
/>
<div class="text-sm font-bold text-gray-600">
{{ model.name }}

View File

@@ -232,24 +232,21 @@ defineExpose({ settingValues });
<div><b>图片尺寸</b></div>
<ElSpace wrap class="mt-4 w-full">
<div class="flex items-center gap-2">
<span></span>
<ElInputNumber
v-model="width"
placeholder="图片宽度"
controls-position="right"
class="!w-32"
/>
<span>px</span>
</div>
<span class="mx-2">×</span>
<div class="flex items-center gap-2">
<span></span>
<ElInputNumber
v-model="height"
placeholder="图片高度"
controls-position="right"
class="!w-32"
/>
<span>px</span>
</div>
</ElSpace>
</div>

View File

@@ -29,11 +29,13 @@ export const AiModelTypeEnum = {
EMBEDDING: 5, // 向量
RERANK: 6, // 重排
};
export interface ImageModel {
image?: string;
key: string;
name: string;
}
export const OtherPlatformEnum: ImageModel[] = [
{
key: AiPlatformEnum.TONG_YI,
@@ -52,6 +54,7 @@ export const OtherPlatformEnum: ImageModel[] = [
name: '硅基流动',
},
];
/**
* AI 图像生成状态的枚举
*/
@@ -60,6 +63,7 @@ export const AiImageStatusEnum = {
SUCCESS: 20, // 已完成
FAIL: 30, // 已失败
};
/**
* AI 音乐生成状态的枚举
*/
@@ -397,6 +401,7 @@ export const MidjourneyModels: ImageModel[] = [
image: 'https://bigpt8.com/pc/_nuxt/nj.ca79b143.png',
},
];
export const MidjourneyVersions = [
{
value: '6.0',
@@ -459,6 +464,7 @@ export const MidjourneySizeList: ImageSize[] = [
style: 'width: 50px; height: 30px;background-color: #dcdcdc;',
},
];
// ========== PAY 模块 ==========
/**
* 支付渠道枚举