king
2020-06-16 6c16e43cd6521460c804391c042348dbb14086fc
src/tabviews/zshare/actionList/excelInbutton/excelin/index.jsx
@@ -7,9 +7,10 @@
class ExcelIn extends Component {
  static propTpyes = {
    btn: PropTypes.object,        // 按钮信息
    MenuID: PropTypes.string,     // 菜单ID
    returndata: PropTypes.func    // 获取返回数据
    btn: PropTypes.object,         // 按钮信息
    MenuID: PropTypes.string,      // 菜单ID
    returndata: PropTypes.func,    // 获取返回数据
    triggerExcelIn: PropTypes.func // 修改上传状态
  }
  state = {
@@ -34,6 +35,7 @@
    const { files } = file.target
    const fileReader = new FileReader()
    this.props.triggerExcelIn()
    fileReader.onload = event => {
      try {
        const { result } = event.target
@@ -103,7 +105,7 @@
  render() {
    return (
      <span>
        {this.state.excelId ? <input className="excel-in-input" id={this.state.excelId + this.props.MenuID} type='file' accept='.xlsx, .xls' onChange={this.onImportExcel} /> : null}
        {this.state.excelId ? <input className="excel-in-input" id={this.state.excelId + this.props.MenuID} type='file' accept='.xlsx, .xls' onAbort={this.onImportExcel} onChange={this.onImportExcel} /> : null}
      </span>
    )
  }