From c78f322521339b2e106152149f567caf06a3d497 Mon Sep 17 00:00:00 2001 From: jinghui Date: Fri, 13 Nov 2026 14:37:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=9F=E5=9B=BE=E9=A1=B5=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E9=80=89=E4=B8=AD=E5=88=97=E8=A1=A8=E7=AC=AC=E4=B8=80?= =?UTF-8?q?=E4=B8=AA=E6=A8=A1=E5=9E=8B(=E5=8E=9F=E5=9B=BA=E5=AE=9A?= =?UTF-8?q?=E6=8C=91pollinations=E5=BC=80=E5=A4=B4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tools/ai-gen/ai-gen.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tools/ai-gen/ai-gen.vue b/src/tools/ai-gen/ai-gen.vue index f1171cd..84b8732 100644 --- a/src/tools/ai-gen/ai-gen.vue +++ b/src/tools/ai-gen/ai-gen.vue @@ -2,7 +2,7 @@ import { getMachineId, licenseHeaders } from '@/tools/license/license'; const models = ref<{ id: string; i2i: boolean; custom?: boolean }[]>([]); -const model = ref('pollinations-flux'); +const model = ref(''); // 打开页面默认选中列表第一个模型 const prompt = ref(''); const loading = ref(false); const error = ref(''); @@ -94,6 +94,7 @@ function mergeModels() { const inhouse = inhouseModels.map((m) => ({ ...m, custom: false })); const mine = provider.value.models.map((id) => ({ id, i2i: false, custom: true })); models.value = [...inhouse, ...mine]; + if (!model.value && models.value.length) model.value = models.value[0].id; } // ---------- 生成历史(服务端落盘,点缩略图回看/下载) ---------- @@ -289,10 +290,9 @@ onMounted(async () => { if (j.code === 200 && Array.isArray(j.data) && j.data.length) { inhouseModels = j.data; mergeModels(); - if (!models.value.some((m: any) => m.id === model.value)) { - // 默认选一个 pollinations(稳定可用) - const p = j.data.find((m: any) => m.id.startsWith('pollinations')); - model.value = (p || j.data[0]).id; + if (!model.value || !models.value.some((m: any) => m.id === model.value)) { + // 默认选中列表第一个模型 + model.value = j.data[0].id; } } else { mergeModels(); @@ -372,7 +372,7 @@ async function generate() { - +