king
2020-02-17 0594fe8d97286a535177f8ba05972d0305fc7dee
src/templates/tableshare/dragelement/card.jsx
@@ -75,6 +75,15 @@
    }
  }
  let hasProfile = false
  if (type === 'action') {
    if (['pop', 'prompt', 'exec'].includes(card.OpenType) && card.intertype === 'inner' && !card.innerFunc) {
      hasProfile = true
    } else if (card.OpenType === 'excelIn') {
      hasProfile = true
    }
  }
  return (
    <div className="page-card" style={type === 'columns' ? { flex: card.Width, opacity: opacity} : { opacity: opacity}}>
      <div ref={node => drag(drop(node))}>
@@ -134,12 +143,6 @@
            {showfield ?
              <div className="ant-table-column-fields">
                <span className="ant-table-column-title">{card.type === 'colspan' ? card.subfield : card.field}</span>
                {/* <span className="ant-table-column-title">
                  {card.type === 'colspan' ?
                    <Paragraph copyable>{card.subfield}</Paragraph> :
                    <Paragraph copyable>{card.field}</Paragraph>
                  }
                </span> */}
              </div> : null
            }
          </span> : null
@@ -148,9 +151,7 @@
      <Icon className="edit" title="编辑" type="edit" onClick={edit} />
      <Icon className="edit close" title="删除" type="close" onClick={del} />
      {type === 'action' ? <Icon className="edit copy" title="复制" type="copy" onClick={copy} /> : null}
      {type === 'action' && ['pop', 'prompt', 'exec', 'excelIn'].includes(card.OpenType) && card.intertype === 'inner' && !card.innerFunc ?
        <Icon className="edit profile" title="校验规则" type="profile" onClick={profile} /> : null
      }
      {hasProfile ? <Icon className="edit profile" title="校验规则" type="profile" onClick={profile} /> : null}
    </div>
  )
}