king
2021-10-14 dddb2c96f42d9c852dba26ff9a27daa12bd85008
src/tabviews/custom/components/share/normalTable/index.jsx
@@ -351,6 +351,39 @@
          {content && _href ? <a href={_href} target="_blank" rel="noopener noreferrer">{content}</a> : null }
        </div>
      )
    } else if (col.type === 'formula') {
      let content = col.formula
      Object.keys(record).forEach(key => {
        let reg = new RegExp('@' + key + '@', 'ig')
        content = content.replace(reg, record[key])
      })
      if (col.eval !== 'false') {
        try {
          // eslint-disable-next-line
          content = eval(content)
        } catch (e) {
          content = ''
        }
      }
      content = content === undefined ? '' : content
      if (content !== '') {
        content = `${col.prefix || ''}${content}${col.postfix || ''}`
        if (col.eval === 'false') {
          content = content.replace(/\n/ig, '<br/>').replace(/\s/ig, '&nbsp;')
          content = <span dangerouslySetInnerHTML={{__html: content}}></span>
        }
      }
      if (col.marks) {
        style = style || {}
        content = this.getMark(record, col.marks, style, content)
      }
      resProps.children = content
    } else if (col.type === 'custom') {
      style.padding = '0px'
      if (col.style) {