--- interface Image { src: string; alt: string; width?: number; height?: number; } interface Props { images: Image[]; className?: string; gap?: number; direction?: 'left' | 'right'; speed?: 'slow' | 'normal' | 'fast'; } const { images, className = "", gap = 16, direction = 'left', speed = 'normal' } = Astro.props; // 计算速度 const getSpeed = () => { switch(speed) { case 'slow': return '60s'; case 'fast': return '20s'; default: return '40s'; } }; const speedValue = getSpeed(); ---