/** * 特殊批量上传UI组件 * 包含音乐、视频、3D场景、品牌VI、买家秀、小红书的批量上传界面 */ 'use client' import Image from 'next/image' import { formatBytes } from '@/components/upload/upload-utils' import { getSpuProductModelValidationError, isPlausibleSpuProductModel } from '@/lib/product-model' import VideoPreviewImageUpload from './VideoPreviewImageUpload' /** * 音乐/视频/品牌VI 批量文件项 */ export interface BatchFileWithSpu { file: File productModel: string } /** * 3D场景批量文件项(带预览图) */ export interface Batch3DFile { file: File productModel: string previewImage?: File } /** * 买家秀/小红书批量文件项(多图) */ export interface BatchImageGroup { productModel: string images: File[] } // ========== 音乐批量上传列表 ========== interface BatchMusicListProps { files: BatchFileWithSpu[] onUpdateProductModel: (index: number, value: string) => void onDelete: (index: number) => void } export function BatchMusicList({ files, onUpdateProductModel, onDelete }: BatchMusicListProps) { if (files.length === 0) return null return (
{item.file.name}
{formatBytes(item.file.size)}
{item.file.name}
{formatBytes(item.file.size)}
{getSpuProductModelValidationError(item.productModel)}
)}{item.file.name}
{formatBytes(item.file.size)}
{item.file.name}
{formatBytes(item.file.size)}
每批次至少需要8张图片(当前:{batch.images.length}张)
)}