king
2023-01-14 004176924ce35c96600f5c18e85478944de8bec6
src/tabviews/custom/components/card/table-card/index.jsx
@@ -122,7 +122,7 @@
  }
  componentDidMount () {
    const { config } = this.state
    const { config, sync } = this.state
    MKEmitter.addListener('reloadData', this.reloadData)
    MKEmitter.addListener('resetSelectLine', this.resetParentParam)
@@ -137,6 +137,21 @@
        }, () => {
          this.loadData('timer')
        })
      })
    }
    if (config.$cache && (config.setting.sync !== 'true' || sync)) {
      Api.getLCacheConfig(config.uuid).then(res => {
        if (!res) return
        let _data = res.map((item, index) => {
          item.key = index
          item.$$uuid = item[config.setting.primaryKey] || ''
          item.$Index = index + 1 + ''
          return item
        })
        this.setState({data: _data})
      })
    }
  }
@@ -297,6 +312,10 @@
        start = config.setting.pageSize * (pageIndex - 1) + 1
      }
      if (config.$cache && pageIndex === 1) {
        Api.writeCacheConfig(config.uuid, result.data || '')
      }
      let data = []
      if (type === 'plus') {