From 5f54ac37078e6f62bb19b8aab1725a6bcf07cd56 Mon Sep 17 00:00:00 2001 From: CI Bot Date: Wed, 9 Sep 2026 18:16:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A0=87=E9=A2=98=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=94=B9=E7=94=A8TextArea=E5=A4=9A=E8=A1=8C+=E6=A0=87=E9=A2=98?= =?UTF-8?q?=E5=BA=93=E8=87=AA=E5=8A=A8=E8=A1=A5=E5=85=A8=EF=BC=8C=E6=A0=87?= =?UTF-8?q?=E9=A2=98=E9=A2=84=E8=A7=88=E5=A2=9E=E5=A4=A7=E5=AD=97=E5=8F=B7?= =?UTF-8?q?=E5=8A=A0=E6=8F=8F=E8=BE=B9=E9=98=B4=E5=BD=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai-avatar/components/PanelTitleConfig.tsx | 16 ++++++++-------- .../ai-avatar/components/PanelVideoSelector.tsx | 14 ++++++++++---- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/apps/web/src/pages/ai-avatar/components/PanelTitleConfig.tsx b/apps/web/src/pages/ai-avatar/components/PanelTitleConfig.tsx index 56c0d2601..5411d7efa 100644 --- a/apps/web/src/pages/ai-avatar/components/PanelTitleConfig.tsx +++ b/apps/web/src/pages/ai-avatar/components/PanelTitleConfig.tsx @@ -7,8 +7,11 @@ * - AiAvatarTitleConfig ↔ TitleSettings 的双向适配 * - 自动生成字幕开关 */ -import React, { useMemo, useState } from "react" +import React, { useMemo, useState, useEffect } from "react" +import { Input } from "antd" 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, @@ -17,7 +20,9 @@ import { getFontFamily, } from "@/pages/generate/constants" import type { AiAvatarTitleConfig } from "../types" -import TitleLibraryModal from "./TitleLibraryModal" +import { getTitles } from "@/api/titles" + +const { TextArea } = Input interface PanelTitleConfigProps { titleConfig: AiAvatarTitleConfig @@ -138,12 +143,7 @@ const PanelTitleConfig: React.FC = ({ titleConfig, onUpda - {/* 标题库选择弹窗 */} - setShowTitleLibrary(false)} - onSelect={(title) => onUpdate({ title })} - /> + ) } diff --git a/apps/web/src/pages/ai-avatar/components/PanelVideoSelector.tsx b/apps/web/src/pages/ai-avatar/components/PanelVideoSelector.tsx index f0568ef34..b09baf3f0 100644 --- a/apps/web/src/pages/ai-avatar/components/PanelVideoSelector.tsx +++ b/apps/web/src/pages/ai-avatar/components/PanelVideoSelector.tsx @@ -70,18 +70,24 @@ export function PanelVideoSelector({ position: "absolute", left: "50%", transform: "translateX(-50%)", - ...(titleConfig.position === "top" ? { top: "10%" } : titleConfig.position === "bottom" ? { bottom: "10%" } : { top: "50%", transform: "translate(-50%, -50%)" }), - fontSize: titleConfig.size, + ...(titleConfig.position === "top" + ? { top: "10%" } + : titleConfig.position === "bottom" + ? { bottom: "10%" } + : { top: "50%", transform: "translate(-50%, -50%)" }), + fontSize: Math.max(titleConfig.size, 32), fontFamily: getFontFamily(titleConfig.font), color: titleConfig.color, fontWeight: titleConfig.bold ? 700 : 400, fontStyle: titleConfig.italic ? "italic" : "normal", - textShadow: titleConfig.shadow ? "2px 2px 4px rgba(0,0,0,0.7)" : undefined, - WebkitTextStroke: titleConfig.stroke ? "1px rgba(0,0,0,0.5)" : undefined, + textShadow: "0 2px 4px rgba(0,0,0,0.5)", + WebkitTextStroke: "2px #000", pointerEvents: "none", zIndex: 10, maxWidth: "90%", textAlign: "center", + whiteSpace: "pre-wrap", + lineHeight: 1.3, }} > {titleConfig.title}