king
2020-04-03 4c6bdfe1f3557e49a315c1564bcb6164c0bc7faa
src/tabviews/zshare/fileupload/index.jsx
@@ -12,7 +12,9 @@
class FileUpload extends Component {
  static propTpyes = {
    value: PropTypes.array    // 按钮信息、表单列表
    value: PropTypes.array,    // 按钮信息、表单列表
    maxFile: PropTypes.any,    // 最大文件数
    fileType: PropTypes.string // 文件显示类型
  }
  state = {
@@ -110,12 +112,19 @@
  }
  render() {
    const { value } = this.props
    const { value, maxFile, fileType } = this.props
    const { showprogress, percent, baseUrl } = this.state
    let uploadable = ''
    if (maxFile && maxFile > 0 && value && value.length >= maxFile) {
      uploadable = 'limit-fileupload'
    }
    const props = {
      name: 'file',
      disabled: showprogress,
      listType: fileType,
      fileList: value,
      action: baseUrl,
      method: 'post',
@@ -125,7 +134,9 @@
      onRemove: this.onRemove,
      data: this.getExtraData,
      beforeUpload: this.beforeUpload,
      className: uploadable
    }
    return (
      <Upload {...props}>
        <Button>