feat:【antd/ele】【ai】优化 api 格式
This commit is contained in:
@@ -547,7 +547,10 @@ onMounted(async () => {
|
||||
|
||||
<template>
|
||||
<Page auto-content-height>
|
||||
<ElContainer class="absolute left-0 top-0 m-4 h-full w-full flex-1">
|
||||
<ElContainer
|
||||
direction="horizontal"
|
||||
class="absolute left-0 top-0 m-4 h-[calc(100%-2rem)] w-[calc(100%-2rem)]"
|
||||
>
|
||||
<!-- 左侧:对话列表 -->
|
||||
<ConversationList
|
||||
class="!bg-card"
|
||||
@@ -560,7 +563,7 @@ onMounted(async () => {
|
||||
/>
|
||||
|
||||
<!-- 右侧:详情部分 -->
|
||||
<ElContainer class="bg-card mx-4">
|
||||
<ElContainer direction="vertical" class="bg-card mx-4 flex-1">
|
||||
<ElHeader
|
||||
class="!bg-card border-border flex !h-12 items-center justify-between border-b !px-4"
|
||||
>
|
||||
@@ -629,9 +632,9 @@ onMounted(async () => {
|
||||
</div>
|
||||
</ElMain>
|
||||
|
||||
<ElFooter class="!bg-card flex flex-col !p-0">
|
||||
<ElFooter height="auto" class="!bg-card flex flex-col !p-0">
|
||||
<form
|
||||
class="border-border mx-4 mb-8 mt-2 flex flex-col rounded-xl border p-2"
|
||||
class="border-border mx-4 mb-4 mt-2 flex flex-col rounded-xl border p-2"
|
||||
>
|
||||
<textarea
|
||||
class="box-border h-24 resize-none overflow-auto rounded-md p-2 focus:outline-none"
|
||||
|
||||
@@ -69,7 +69,7 @@ async function handleGenerateImage() {
|
||||
width: width.value, // 图片宽度
|
||||
height: height.value, // 图片高度
|
||||
options: {},
|
||||
} as unknown as AiImageApi.ImageDrawReq;
|
||||
} as unknown as AiImageApi.ImageDrawReqVO;
|
||||
await drawImage(form);
|
||||
} finally {
|
||||
// 回调
|
||||
|
||||
@@ -116,7 +116,7 @@ async function handleGenerateImage() {
|
||||
options: {
|
||||
style: style.value, // 图像生成的风格
|
||||
},
|
||||
} as AiImageApi.ImageDrawReq;
|
||||
} as AiImageApi.ImageDrawReqVO;
|
||||
// 发送请求
|
||||
await drawImage(form);
|
||||
} finally {
|
||||
|
||||
@@ -144,7 +144,7 @@ async function handleImageMidjourneyButtonClick(
|
||||
const data = {
|
||||
id: imageDetail.id,
|
||||
customId: button.customId,
|
||||
} as AiImageApi.ImageMidjourneyAction;
|
||||
} as AiImageApi.ImageMidjourneyActionVO;
|
||||
// 2. 发送 action
|
||||
await midjourneyAction(data);
|
||||
// 3. 刷新列表
|
||||
|
||||
@@ -103,7 +103,7 @@ async function handleGenerateImage() {
|
||||
height: imageSize.height,
|
||||
version: selectVersion.value,
|
||||
referImageUrl: referImageUrl.value,
|
||||
} as AiImageApi.ImageMidjourneyImagineReq;
|
||||
} as AiImageApi.ImageMidjourneyImagineReqVO;
|
||||
await midjourneyImagine(req);
|
||||
} finally {
|
||||
// 回调
|
||||
|
||||
@@ -103,7 +103,7 @@ async function handleGenerateImage() {
|
||||
clipGuidancePreset: clipGuidancePreset.value, // 文本提示相匹配的图像 CLIP
|
||||
stylePreset: stylePreset.value, // 风格
|
||||
},
|
||||
} as unknown as AiImageApi.ImageDrawReq;
|
||||
} as unknown as AiImageApi.ImageDrawReqVO;
|
||||
await drawImage(form);
|
||||
} finally {
|
||||
// 回调
|
||||
|
||||
Reference in New Issue
Block a user