king
2022-06-10 9fa028fdac3517c2c2b167e52782f83185daa131
src/templates/modalconfig/checkCard/index.jsx
@@ -16,6 +16,7 @@
    const { display, width, options, fields, ratio, picratio, backgroundColor, borderColor } = this.props.config
    let _ratio = picratio || ratio
    let _options = []
    let paddingTop = '100%'
    if (_ratio === '4:3') {
      paddingTop = '75%'
@@ -23,6 +24,10 @@
      paddingTop = '66.7%'
    } else if (_ratio === '16:9') {
      paddingTop = '56.25%'
    }
    if (options) {
      _options = options.filter(op => !op.Hide)
    }
    let style = {}
@@ -34,7 +39,7 @@
    if (display !== 'picture') {
      let _style = backgroundColor ? {backgroundColor} : null
 
      if (!options || options.length === 0) {
      if (_options.length === 0) {
        return <Col span={width}>
          <div className="card-cell" style={style}>
            <div className="bg-mask" style={_style}></div>
@@ -45,7 +50,7 @@
          </div>
        </Col>
      }
      return options.map(item => {
      return _options.map(item => {
        return <Col span={width} key={item.key}>
          <div className="card-cell" style={style}>
            <div className="bg-mask" style={_style}></div>
@@ -56,13 +61,13 @@
        </Col>
      })
    } else {
      if (!options || options.length === 0) {
      if (_options.length === 0) {
        return <Col span={width}>
          <div className="card-pic-cell" style={{...style, paddingTop, background: '#91d5ff'}}>
          </div>
        </Col>
      }
      return options.map(item => {
      return _options.map(item => {
        return <Col span={width} key={item.key}>
          <div className="card-pic-cell" style={{...style, paddingTop, backgroundImage: `url(${item.$url})`}}>
          </div>