feat:【ele】【ai】image 的代码评审

This commit is contained in:
YunaiV
2025-11-15 15:31:47 +08:00
parent 636df26e73
commit 104be22d0d
13 changed files with 20 additions and 28 deletions

View File

@@ -77,6 +77,7 @@ onMounted(async () => {
</Button>
</div>
<div class="flex">
<!-- TODO @AI居右对齐 -->
<Button
class="m-0 p-2"
type="text"

View File

@@ -101,7 +101,7 @@ watch(
},
{ immediate: true, deep: true },
);
/** 暴露组件方法 */
defineExpose({ settingValues });
</script>
<template>

View File

@@ -138,7 +138,6 @@ async function settingValues(detail: AiImageApi.Image) {
await handleSizeClick(imageSize);
}
/** 暴露组件方法 */
defineExpose({ settingValues });
</script>
<template>

View File

@@ -10,7 +10,7 @@ import {
StableDiffusionSamplers,
StableDiffusionStylePresets,
} from '@vben/constants';
import { formatDate } from '@vben/utils';
import { formatDateTime } from '@vben/utils';
import { Image } from 'ant-design-vue';
@@ -53,12 +53,8 @@ watch(
<div class="mb-5 w-full overflow-hidden break-words">
<div class="text-lg font-bold">时间</div>
<div class="mt-2">
<div>
提交时间{{ formatDate(detail.createTime, 'yyyy-MM-dd HH:mm:ss') }}
</div>
<div>
生成时间{{ formatDate(detail.finishTime, 'yyyy-MM-dd HH:mm:ss') }}
</div>
<div>提交时间{{ formatDateTime(detail.createTime) }}</div>
<div>生成时间{{ formatDateTime(detail.finishTime) }}</div>
</div>
</div>

View File

@@ -135,7 +135,6 @@ async function settingValues(detail: AiImageApi.Image) {
referImageUrl.value = detail.options.referImageUrl;
}
/** 暴露组件方法 */
defineExpose({ settingValues });
</script>
<template>

View File

@@ -126,7 +126,6 @@ async function settingValues(detail: AiImageApi.Image) {
stylePreset.value = detail.options?.stylePreset;
}
/** 暴露组件方法 */
defineExpose({ settingValues });
</script>
<template>
@@ -225,6 +224,7 @@ defineExpose({ settingValues });
</div>
<!-- 图片尺寸 -->
<!-- TODO @AI /Users/yunai/Java/yudao-ui-admin-vben-v5/apps/web-antd/src/views/ai/image/index/modules/common/index.vue 的问题 -->
<div class="mt-8">
<div><b>图片尺寸</b></div>
<Space wrap class="mt-4 w-full">

View File

@@ -31,7 +31,9 @@ async function getList() {
loading.value = false;
}
}
const debounceGetList = useDebounceFn(getList, 80);
/** 搜索按钮操作 */
function handleQuery() {
queryParams.pageNo = 1;