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() : ""}
))}