king
2023-05-25 5e871a4164869bac7927ea6884dbadd650b1cadf
src/tabviews/custom/components/card/cardcellList/index.jsx
@@ -76,10 +76,8 @@
    elements: PropTypes.array,       // 元素集
  }
  state = {}
  shouldComponentUpdate (nextProps, nextState) {
    return !is(fromJS(this.state), fromJS(nextState)) || !is(fromJS(this.props), fromJS(nextProps))
    return !is(fromJS(this.props), fromJS(nextProps))
  }
  /**
@@ -133,12 +131,7 @@
      }
      window.open(_url)
      return
    } else if (card.linkType === 'qywx') {
      notification.warning({
        top: 92,
        message: 'PC不支持打开企业微信!',
        duration: 5
      })
    } else if (card.linkType === 'qywx' || card.linkType === 'linkmenu') {
      return
    }
@@ -757,6 +750,10 @@
                // eslint-disable-next-line
                _val = eval(_val)
              } catch (e) {
                if (window.debugger) {
                  console.info(_val)
                  console.warn(e)
                }
                _val = 0
              }
            }
@@ -779,6 +776,10 @@
              // eslint-disable-next-line
              _val = eval(_val)
            } catch (e) {
              if (window.debugger) {
                console.info(_val)
                console.warn(e)
              }
              _val = ''
            }
          }
@@ -790,6 +791,11 @@
          return null
        }
  
        if (card.round && typeof(val) === 'number') {
          val = Math.round(val * card.round) / card.round
          val = val.toFixed(card.decimal)
        }
        if (val !== '') {
          if (val && typeof(val) === 'string') {
            val = val.replace(/\n/ig, '<br/>')