king
2019-12-06 72194d09bc2eb9ab0b60bd000d98dc94c99ce82d
src/tabviews/datamanage/table/index.jsx
@@ -11,10 +11,8 @@
    selectable: PropTypes.bool,
    dict: PropTypes.object, // 字典项
    columns: PropTypes.array, // 表格列
    data: PropTypes.oneOfType([
      PropTypes.object,
      PropTypes.array
    ])
    actions: PropTypes.any,
    data: PropTypes.any
  }
  state = {
@@ -24,11 +22,7 @@
    pageSize: 10,
    columns: this.props.columns.map(item => {
      let _width = parseInt(item.Width) || 50
      // if (/ID$/.test(item.FieldName) || item.FieldName.includes('PassWord')) {
      //   _width = _width * 3
      // } else if (item.FieldName.includes('Date')) {
      //   _width = _width * 2
      // }
      return {
        align: item.Align,
        dataIndex: item.FieldName,
@@ -116,9 +110,13 @@
        onChange: this.onSelectChange
      }
    }
    let offset = 48
    if (this.props.actions && this.props.actions.length > 0) {
      offset = 105
    }
    return (
      <div className="datamanage-table">
        {this.state.fixed && <Affix offsetTop={105} className="fix-header">
        {this.state.fixed && <Affix offsetTop={offset} className="fix-header">
          <Table
            bordered={true}
            rowSelection={rowSelection}