'use client' import Image from 'next/image' interface DisplayImageUploadProps { displayImageUrl: string isDisplayImageDragging: boolean displayImageDropZoneRef: React.RefObject onDisplayImageChange: (e: React.ChangeEvent) => void onDisplayImageDragEnter: (e: React.DragEvent) => void onDisplayImageDragLeave: (e: React.DragEvent) => void onDisplayImageDragOver: (e: React.DragEvent) => void onDisplayImageDrop: (e: React.DragEvent) => void materialType?: string // 素材类型,用于显示不同的提示文字 } export default function DisplayImageUpload({ displayImageUrl, isDisplayImageDragging, displayImageDropZoneRef, onDisplayImageChange, onDisplayImageDragEnter, onDisplayImageDragLeave, onDisplayImageDragOver, onDisplayImageDrop, materialType = '', }: DisplayImageUploadProps) { // 根据素材类型显示不同的标签和提示 const isBrandVI = materialType === '品牌VI灵感' const labelText = isBrandVI ? '展示图片(可选)' : '详情页展示图片 *' const hintText = isBrandVI ? '上传品牌VI的展示图片,用于详情页预览。如果不上传,将直接显示PDF预览。' : '上传详情页/详情模板的展示图片,或拖拽图片到此区域' return (
{displayImageUrl ? (
Display
) : (
)}

{hintText}

{!isBrandVI && (

💡 上传原图即可,系统会自动压缩和切片(高度超过1500px会自动切割)

)}
) }