'use client' import { useRef } from 'react' import Image from 'next/image' import { Plus } from 'lucide-react' import { dropZoneActiveClass, dropZoneIdleClass, fieldHintClass, fieldLabelClass, uploadAreaButtonClass, uploadAreaEmptyButtonClass, uploadAreaTileClass, } from './upload-field-styles' interface DisplayImageUploadProps { displayImageUrl: string isDisplayImageDragging: boolean displayImageDropZoneRef: React.RefObject disabled?: boolean 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, disabled = false, onDisplayImageChange, onDisplayImageDragEnter, onDisplayImageDragLeave, onDisplayImageDragOver, onDisplayImageDrop, materialType = '', }: DisplayImageUploadProps) { const inputRef = useRef(null) const isBrandVI = materialType === '品牌VI灵感' return (
{displayImageUrl && (
已选择的详情页展示图片
)}

{isBrandVI ? '不上传时直接显示 PDF 预览' : '支持拖入图片 · 原图会自动压缩,高图会自动切片'}

) }