12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- import React, { Component } from "react";
- import ImgList from "../../../common/imgList";
- class PicturesWall extends Component {
- constructor(props) {
- super(props);
- this.state = {
- fileList: this.props.pictureUrl,
- };
- this.handleChange = this.handleChange.bind(this);
- }
- handleChange(info) {
- let fileList = info.fileList;
- this.setState({
- fileList,
- });
- this.props.fileList(fileList);
- }
- componentWillReceiveProps(nextProps) {
- this.state.fileList = nextProps.pictureUrl;
- this.state.pojectApplicationUrl = undefined;
- }
- render() {
- const { fileList } = this.state;
- return (
- <div style={{ display: "inline-block" }}>
- <ImgList
- domId={this.props.domId}
- uploadConfig={{
- action:globalConfig.context + this.props.url,
- data:{ sign: this.props.sign },
- multiple:true,
- listType:"picture-card",
- }}
- onChange={(infor)=>{
- this.handleChange(infor)
- }}
- fileList={fileList}
- />
- </div>
- );
- }
- }
- export default PicturesWall;
|