123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- import React, { Component } from "react";
- import { Modal, Icon, Upload } from "antd";
- import { timingSafeEqual } from "crypto";
- 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;
- }
- render() {
- const { fileList } = this.state;
- const { orderNo = undefined, deleteApi = "", sign = "" } = this.props
- return (
- <div style={{ display: "inline-block" }}>
- <ImgList
- deleteApi={deleteApi}
- orderNo={orderNo}
- sign={sign}
- domId={this.props.domId}
- uploadConfig={{
- action: globalConfig.context + this.props.url,
- data: {
- orderNo: orderNo,
- sign: this.props.sign,
- },
- multiple: true,
- listType: "picture-card",
- }}
- onChange={(infor) => {
- this.handleChange(infor)
- }}
- fileList={fileList}
- />
- </div>
- );
- }
- }
- export default PicturesWall;
|