import React from 'react'
import './index.less'
import ImageView from '../../../components/ImageView';

const BasePic = ({src,style}) => <span className='base-pic' style={style}><ImageView src={src} /></span>
/**
 * images 图片数组
 * maxLen 最多排列几张图 6/5/9
 */
const PicArray = ({images,maxLen=6}) => {
  if(images.length >= maxLen){
    // images.push('...')
  }
  return <div className='base_row'>
  {images.slice(0,maxLen + 1).map((src,index) => {
  return <BasePic src={src} style={{transform:`translateX(-${index*8}px)`}} />})}
</div>}

export default PicArray
