diff --git a/apps/desktop/src/pages/tools/OutfitSearchTool.tsx b/apps/desktop/src/pages/tools/OutfitSearchTool.tsx index 5bae38f..c3cd0b2 100644 --- a/apps/desktop/src/pages/tools/OutfitSearchTool.tsx +++ b/apps/desktop/src/pages/tools/OutfitSearchTool.tsx @@ -116,8 +116,9 @@ const OutfitSearchTool: React.FC = () => { } }, [selectedImage, searchConfig]); - // 执行搜索 - const handleSearch = useCallback(async () => { + // 执行搜索 - 支持指定页码 + const handleSearch = useCallback(async (targetPage?: number) => { + const pageToUse = targetPage ?? currentPage; setIsSearching(true); setSearchError(null); @@ -144,7 +145,7 @@ const OutfitSearchTool: React.FC = () => { query: 'model fashion outfit', config: simpleConfig, page_size: 9, - page_offset: (currentPage - 1) * 9 + page_offset: (pageToUse - 1) * 9 }; console.log('发送搜索请求:', searchRequest); @@ -298,8 +299,9 @@ const OutfitSearchTool: React.FC = () => {