king
2023-02-17 8137ac074ce6370e4b46295e7acf9c7870ef82d2
src/tabviews/custom/components/table/normal-table/index.jsx
@@ -54,7 +54,6 @@
  UNSAFE_componentWillMount () {
    const { data, initdata } = this.props
    let _config = fromJS(this.props.config).toJS()
    let _cols = new Map()
    let _data = null
    let _sync = _config.setting.sync === 'true'
@@ -131,20 +130,8 @@
      }
    }
    _config.columns.forEach(item => {
      if (item.type !== 'number') return
      _cols.set(item.field, item)
    })
    _config.cols.forEach(column => {
      if (column.type === 'custom') {
        column.elements = column.elements.map(item => {
          if (item.eleType === 'number' && item.field && _cols.has(item.field) && typeof(item.decimal) !== 'number') {
            item.decimal = _cols.get(item.field).decimal || 0
          }
          return item
        })
      } else if (column.type === 'action') {
      if (column.type === 'action') {
        column.operations = column.elements
      }
    })