king
2023-02-23 306eb5f035302baef95995437e2dc735110b6536
src/tabviews/custom/components/card/data-card/index.jsx
@@ -99,8 +99,6 @@
    _config.subcards = null
    
    let _cols = new Map()
    let _data = null
    let _sync = _config.setting.sync === 'true'
@@ -144,24 +142,6 @@
        }
      }
    }
    _config.columns.forEach(item => {
      if (item.type !== 'number') return
      _cols.set(item.field, item)
    })
    _card.elements = _card.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
    })
    _card.backElements = _card.backElements.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
    })
    let supComs = null
    if (_config.wrap.supType === 'multi') {
@@ -937,7 +917,7 @@
    }
    let checkAll = ''
    if (config.wrap.selStyle.indexOf('check') > -1) {
    if (config.wrap.selStyle && config.wrap.selStyle.indexOf('check') > -1) {
      if (selectedData.length > 0) {
        checkAll = selectedData.length < data.length ? ' half' : ' whole'
      }
@@ -973,7 +953,7 @@
              </Col>
            ))}
            {data && data.map((item, index) => {
              let className = card.setting.click ? 'mk-card pointer ' : 'mk-card '
              let className = 'mk-card '
              if (config.wrap.parity === 'true') {
                if (index % 2 === 1) {
                  className += 'mk-parity-bg '
@@ -988,8 +968,8 @@
              }
              return (
                <Col className={className} key={index} span={card.setting.width} onClick={() => {this.changeCard(index, item)}}>
                  <CardItem card={card} cards={config} data={item}>
                <Col className={className} key={index} span={card.setting.width}>
                  <CardItem card={card} cards={config} data={item} onClick={() => {this.changeCard(index, item)}}>
                    <span className="circle-select"></span>
                  </CardItem>
                </Col>
@@ -1012,7 +992,5 @@
    )
  }
}
export default DataCard