1234567891011121314151617181920212223242526272829 |
- import React,{Component} from 'react';
- import './index.less';
- class ImgList extends Component{
- constructor(props) {
- super(props);
- this.state={}
- }
- render() {
- return (
- <div className='ImgList'>
- {
- this.props.fileList.map((value,index)=>(
- <div key={index} className='fileItem' style={{
- width: this.props.width ? this.props.width : '100px',
- height: this.props.height ? this.props.height : '100px',
- }}>
- <img src={value.url} className='imgFile'/>
- </div>
- ))
- }
- {console.log(this.props.fileList,'图片')}
- </div>
- )
- }
- }
- export default ImgList;
|