king
2020-10-20 7b01bec1609710729a868093ad69484ebea82d80
src/tabviews/zshare/fileupload/index.jsx
@@ -8,11 +8,6 @@
import Utils from '@/utils/utils.js'
import './index.scss'
// let Url = '/Upload'
// if (process.env.NODE_ENV === 'production') {
//   Url = document.location.origin + '/' + window.GLOB.service + 'zh-CN/Home/Upload'
// }
let service = ''
if (process.env.NODE_ENV === 'production') {
  service = document.location.origin + '/' + window.GLOB.service
@@ -22,7 +17,7 @@
class FileUpload extends Component {
  static propTpyes = {
    value: PropTypes.array,    // 按钮信息、表单列表
    value: PropTypes.array,    // 文件数组
    maxFile: PropTypes.any,    // 最大文件数
    fileType: PropTypes.string // 文件显示类型
  }
@@ -81,12 +76,6 @@
      duration: 5
    })
  }
  // getExtraData = () => {
  //   return {
  //     RootPath: 'Content/images/upload/'
  //   }
  // }
  shardupload = (params) => {
    let param = params.chunks.shift()
@@ -229,7 +218,6 @@
      chunkFileReader.readAsArrayBuffer(blobSlice.call(file, start, end))
    }
    // loadNext()
    return false
  }
@@ -262,16 +250,18 @@
      multiple: false,
      onChange: this.onChange,
      onRemove: this.onRemove,
      // data: this.getExtraData,
      beforeUpload: this.beforeUpload,
      className: uploadable
    }
    return (
      <Upload {...props}>
        <Button>
        {fileType !== 'picture-card' ? <Button>
          <Icon type="upload" /> 点击上传
        </Button>
        </Button> : null}
        {fileType === 'picture-card' ? <span style={{whiteSpace: 'nowrap'}}>
          <Icon type="upload" /> 点击上传
        </span> : null}
        {showprogress ? <Progress percent={percent} size="small" /> : null}
      </Upload>
    )