king
2021-06-22 29432c9167e3fcdf83f35d0bb9dbe9acb7c7ffbf
src/tabviews/zshare/mutilform/checkCard/index.jsx
@@ -57,7 +57,7 @@
  }
  getCards = () => {
    const { display, width, options, fields, ratio, multiple } = this.props.card
    const { display, width, options, fields, ratio, multiple, backgroundColor, borderColor } = this.props.card
    const { selectKeys } = this.state
    let paddingTop = '100%'
@@ -69,11 +69,20 @@
      paddingTop = '56.25%'
    }
    let style = {}
    if (borderColor) {
      style.borderColor = borderColor
    }
    if (!options || options.length === 0) {
      return null
    } else if (display !== 'picture') {
      if (!fields || fields.length === 0) {
        return null
      }
      if (backgroundColor) {
        style.backgroundColor = backgroundColor
      }
      return options.map(item => {
        let _active = false
@@ -84,7 +93,7 @@
        }
        return <Col span={width} key={item.key}>
          <div className={'card-cell ' + (_active ? 'active' : '')} onClick={() => this.changeCard(item)}>
          <div className={'card-cell ' + (_active ? 'active' : '')} style={style} onClick={() => this.changeCard(item)}>
            {fields.map(col => {
              return <span key={col.key} style={{color: col.color, fontSize: col.fontSize + 'px', height: col.fontSize * 1.5 + 'px', textAlign: col.align}}>{item[col.field]}</span>
            })}
@@ -101,7 +110,7 @@
        }
        return <Col span={width} key={item.key}>
          <div className={'card-pic-cell ' + (_active ? 'active' : '')} onClick={() => this.changeCard(item)} style={{paddingTop, backgroundImage: `url(${item.$url})`}}>
          <div className={'card-pic-cell ' + (_active ? 'active' : '')} onClick={() => this.changeCard(item)} style={{...style, paddingTop, backgroundImage: `url(${item.$url})`}}>
          </div>
        </Col>
      })