king
2021-01-08 da7068bd48791cdee966c786ce0dfd46f6e03df9
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -170,7 +170,7 @@
  }
  render() {
    let { col, config, record, className, style, triggerLink, updateStatus, ...resProps } = this.props
    let { col, config, record, className, style, triggerLink, ...resProps } = this.props
    if (!col) return (<td {...resProps} className={className} style={style}/>)
    
@@ -347,12 +347,12 @@
    } else if (col.type === 'custom') {
      style.padding = '0px'
      resProps.children = (
        <CardCellComponent data={record} cards={config} elements={col.elements} updateStatus={this.props.updateStatus}/>
        <CardCellComponent data={record} cards={config} elements={col.elements}/>
      )
    } else if (col.type === 'action') {
      style.padding = '0px 5px'
      resProps.children = (
        <CardCellComponent data={record} cards={config} elements={col.elements} updateStatus={this.props.updateStatus}/>
        <CardCellComponent data={record} cards={config} elements={col.elements}/>
      )
    }
@@ -376,7 +376,6 @@
    loading: PropTypes.bool,         // 表格加载中
    refreshdata: PropTypes.func,     // 表格中排序列、页码的变化时刷新
    chgSelectData: PropTypes.func,   // 数据切换
    refreshbyaction: PropTypes.func, // 按钮执行完成后刷新
  }
  state = {
@@ -442,8 +441,7 @@
              record,
              col: item,
              config: item.type === 'custom' || item.type === 'action' ? {setting, columns: fields} : null,
              triggerLink: this.triggerLink,
              updateStatus: this.updateStatus
              triggerLink: this.triggerLink
            })
          }
        }
@@ -498,12 +496,6 @@
      return
    }
    MKEmitter.removeListener('resetTable', this.resetTable)
  }
  updateStatus = (type, positon, btn) => {
    if (type === 'refresh') {
      this.props.refreshbyaction(positon, btn)
    }
  }
  // 字段透视