/** * 模型列表 - 移动端卡片视图 */ import React from 'react' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' import { Pencil, Trash2 } from 'lucide-react' import type { ModelInfo } from '../types' interface ModelCardListProps { /** 当前页显示的模型 (分页后的) */ paginatedModels: ModelInfo[] /** 所有模型列表 (未分页) */ allModels: ModelInfo[] /** 编辑模型回调 */ onEdit: (model: ModelInfo, index: number) => void /** 删除模型回调 */ onDelete: (index: number) => void /** 检查模型是否被使用 */ isModelUsed: (modelName: string) => boolean /** 搜索关键词 */ searchQuery: string } export const ModelCardList = React.memo(function ModelCardList({ paginatedModels, allModels, onEdit, onDelete, isModelUsed, searchQuery, }: ModelCardListProps) { if (paginatedModels.length === 0) { return (
{model.model_identifier}
{model.api_provider}
{model.temperature != null ? model.temperature : 默认}
¥{model.price_in}/M
¥{model.price_out}/M