king
2023-10-04 ae46c8e640ed64abd7605b289554377e0cdc0cb7
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -76,7 +76,7 @@
  }
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.props.data), fromJS(nextProps.data)) || (nextProps.syncData && !is(fromJS(this.props.syncData), fromJS(nextProps.syncData)))
    return !is(fromJS(this.props.data), fromJS(nextProps.data)) || (nextProps.syncData ? !is(fromJS(this.props.syncData), fromJS(nextProps.syncData)) : false)
  }
  /**
@@ -542,6 +542,16 @@
          val = card.tooltip
        }
        if (/\\n|\n/.test(val)) {
          val = val.replace(/(\\n|\n)$/, '')
          if (val) {
            val = val.split(/\\n|\n/)
            val = <div>{val.map((cell, i) => <div style={{marginBottom: 2}} key={i}>{cell}</div>)}</div>
          }
        }
        if (card.tipType === 'text') {
          contents.push(
            <div className={'ant-col ant-col-' + card.width} key={card.uuid} style={_style_} span={card.width}>
@@ -764,9 +774,7 @@
            let func = new Function('data', card.formula)
            val = func(_data)
          } catch (e) {
            if (window.debugger) {
              console.warn(e)
            }
            console.warn(e)
            val = ''
          }
        } else if (card.$sync) {
@@ -784,10 +792,8 @@
                // eslint-disable-next-line
                _val = eval(_val)
              } catch (e) {
                if (window.debugger) {
                  console.info(_val)
                  console.warn(e)
                }
                console.info(_val)
                console.warn(e)
                _val = 0
              }
            }
@@ -810,10 +816,8 @@
              // eslint-disable-next-line
              _val = eval(_val)
            } catch (e) {
              if (window.debugger) {
                console.info(_val)
                console.warn(e)
              }
              console.info(_val)
              console.warn(e)
              _val = ''
            }
          }
@@ -935,6 +939,9 @@
  
        if (data.$$type === 'extendCard') {
          _data = data.$$selectedData || []
          if (card.Ot === 'notRequired' && _data.length === 0) {
            _data = [data]
          }
        } else if (card.$sync) {
          _data = this.props.syncData || []
        } else if (data.$$empty) {