From d5ddb47c8f430a09c049c7af57d32d1e1c0f028b Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Fri, 7 Aug 2026 12:24:03 +0800 Subject: [PATCH 1/2] feat: merge title library selection and manual input into single AutoComplete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replace separate Select (title library) + input (manual) with unified AutoComplete - Remove '或手动选择' divider line - AutoComplete supports both typing custom titles and selecting from library - Maintains filtering, clear, and empty state functionality - Saves vertical space in Step4 UI --- .../components/Step4TitleSettings.tsx | 30 ++++++------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/apps/web/src/pages/generate/components/Step4TitleSettings.tsx b/apps/web/src/pages/generate/components/Step4TitleSettings.tsx index aac2df0f2..184a27057 100644 --- a/apps/web/src/pages/generate/components/Step4TitleSettings.tsx +++ b/apps/web/src/pages/generate/components/Step4TitleSettings.tsx @@ -2,7 +2,7 @@ * Step 4 标题设置组件 */ import React from "react" -import { Select } from "antd" +import { AutoComplete } from "antd" import { POSITION_OPTIONS, FONT_OPTIONS } from "../constants" import type { TitleSettings } from "../types" import { useStep4Title } from "../hooks/useStep4Title" @@ -75,10 +75,6 @@ const Step4TitleSettings: React.FC = (props) => { onRefresh={t.handleRefreshAiTitles} /> -
- 或手动选择 -
-
AI 自动选择标题
@@ -87,21 +83,22 @@ const Step4TitleSettings: React.FC = (props) => {
- - t.updateTitle(e.target.value)} - maxLength={50} - /> -
)} -- 2.54.0 From 499c66c295bed2ea035709bba35dcbeb7d689d9d Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Fri, 7 Aug 2026 12:28:48 +0800 Subject: [PATCH 2/2] fix: add maxLength and remove redundant onSelect for AutoComplete - Add maxLength={50} to match original input constraint - Remove redundant onSelect handler (onChange covers both typing and selecting) --- apps/web/src/pages/generate/components/Step4TitleSettings.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/pages/generate/components/Step4TitleSettings.tsx b/apps/web/src/pages/generate/components/Step4TitleSettings.tsx index 184a27057..698dbe5d0 100644 --- a/apps/web/src/pages/generate/components/Step4TitleSettings.tsx +++ b/apps/web/src/pages/generate/components/Step4TitleSettings.tsx @@ -87,9 +87,9 @@ const Step4TitleSettings: React.FC = (props) => { t.updateTitle(val || "")} onChange={(val) => t.updateTitle(val || "")} options={t.userTitles.map((ut) => ({ label: ut.content, -- 2.54.0