king
2023-03-11 34e7681fd12b1c4e4994d3bea1a553870e10bc50
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'
@@ -130,31 +129,6 @@
        }
      }
    }
    _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') {
        column.operations = column.elements
      }
    })
    // if (setting.color) {
    //   setting.style.color = setting.color
    // }
    // if (setting.fontSize) {
    //   setting.style.fontSize = setting.fontSize
    // }
    if (_config.wrap.collapse === 'true') {
      _config.wrap.title = _config.wrap.title || ' '
@@ -240,7 +214,7 @@
    let result = await Api.genericInterface(param)
    if (result.status) {
      this.loaded = true
      if (config.$cache && pageIndex === 1) {
      if (config.$cache && pageIndex === 1 && config.setting.onload !== 'false') {
        Api.writeCacheConfig(config.uuid, result.data || '')
      }