From f72d640e8cbb2bf74a11049eee968746bf27abb7 Mon Sep 17 00:00:00 2001 From: deploy-agent Date: Wed, 9 Sep 2026 21:11:17 +0800 Subject: [PATCH] =?UTF-8?q?style(ai-avatar):=20prettier=20=E6=A0=BC?= =?UTF-8?q?=E5=BC=8F=E5=8C=96=20PanelTitleConfig/TitleLibraryModal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复 #1828 前端对接代码的 prettier check 失败,仅格式调整无逻辑改动。 --- .../pages/ai-avatar/components/PanelTitleConfig.tsx | 10 ++++------ .../pages/ai-avatar/components/TitleLibraryModal.tsx | 3 ++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/apps/web/src/pages/ai-avatar/components/PanelTitleConfig.tsx b/apps/web/src/pages/ai-avatar/components/PanelTitleConfig.tsx index 2cea58f06..2981494cc 100644 --- a/apps/web/src/pages/ai-avatar/components/PanelTitleConfig.tsx +++ b/apps/web/src/pages/ai-avatar/components/PanelTitleConfig.tsx @@ -13,11 +13,7 @@ import TitleStylePanel from "@/pages/generate/components/title/TitleStylePanel" import TitleLibraryAutoComplete from "@/pages/generate/components/title/TitleLibraryAutoComplete" import type { TitleOption } from "@/pages/generate/components/title/TitleLibraryAutoComplete" import type { TitleSettings } from "@/pages/generate/types" -import { - POSITION_OPTIONS, - FONT_OPTIONS, - TITLE_PRESETS, -} from "@/pages/generate/constants" +import { POSITION_OPTIONS, FONT_OPTIONS, TITLE_PRESETS } from "@/pages/generate/constants" import type { AiAvatarTitleConfig } from "../types" import { getTitles } from "@/api/titles" @@ -93,7 +89,9 @@ const PanelTitleConfig: React.FC = ({ titleConfig, onUpda key={titleConfig.title} placeholder="选择标题填入上方" value="" - onChange={(val) => { if (val) onUpdate({ title: val }) }} + onChange={(val) => { + if (val) onUpdate({ title: val }) + }} options={titleOptions} maxLength={200} style={{ flex: 1 }} diff --git a/apps/web/src/pages/ai-avatar/components/TitleLibraryModal.tsx b/apps/web/src/pages/ai-avatar/components/TitleLibraryModal.tsx index d8dc8dde7..52ad30ca8 100644 --- a/apps/web/src/pages/ai-avatar/components/TitleLibraryModal.tsx +++ b/apps/web/src/pages/ai-avatar/components/TitleLibraryModal.tsx @@ -76,7 +76,8 @@ const TitleLibraryModal: React.FC = ({ open, onClose, on >
{t.content}
- {t.word_count ?? t.content.length}字 · {t.created_at ? new Date(t.created_at).toLocaleDateString() : ""} + {t.word_count ?? t.content.length}字 ·{" "} + {t.created_at ? new Date(t.created_at).toLocaleDateString() : ""}
))}