@@ -2,6 +2,7 @@ import { useState } from "react";
22import { DownOutlined , CheckOutlined , SearchOutlined } from "@ant-design/icons" ;
33import { Dropdown , Input , Tabs , Spin } from "antd" ;
44import { ProductIconRenderer } from "../icon/ProductIconRenderer" ;
5+ import EmptyData from "../../assets/empty-data.svg" ;
56import type { ICategory , IProductDetail } from "../../lib/apis" ;
67
78
@@ -29,7 +30,7 @@ export function ModelSelector({
2930 const currentModel = modelList . find ( m => m . productId === selectedModelId ) || modelList [ 0 ] ;
3031
3132 // 根据分类和搜索过滤模型
32- const filteredModels = modelList . filter ( model => {
33+ const filteredModels = modelList . filter ( model => {
3334 // 分类过滤:如果选择"全部"或模型的 productCategories 包含当前选中的分类
3435 const matchesCategory = activeCategory === "all" ||
3536 model . categories . map ( c => c . categoryId ) . includes ( activeCategory ) ;
@@ -113,8 +114,12 @@ export function ModelSelector({
113114 </ div >
114115 ) ) }
115116 { ! loading && filteredModels . length === 0 && (
116- < div className = "text-center py-8 text-gray-400" >
117- 未找到匹配的模型
117+ < div className = "text-center flex gap-4 flex-col items-center justify-center py-14 text-gray-400" >
118+ < img src = { EmptyData } />
119+ < div className = "text-[#333] text-[16px] font-medium" >
120+ 暂无模型
121+ </ div >
122+ < div className = "text-[#333]" > 您需要首先在 Admin 中配置模型,才能在 HiChat 中体验</ div >
118123 </ div >
119124 ) }
120125 </ div >
0 commit comments