标题前点的制作

Posted lipu12281

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了标题前点的制作相关的知识,希望对你有一定的参考价值。

    {
        dataIndex: ‘state‘,
        title: formatMessage({ id: ‘approval.status‘, defaultMessage: ‘审批状态‘ }),
        render:state=> {
            const obj = APPROVAL_STATES.find(o => o.value === state) || {};
            const background = state === ‘PASS‘? ‘#52C41A‘:state === ‘SUBMITTED‘ ? ‘#1890FF‘:state === ‘REJECT‘ ? ‘#F5222D‘:‘#FAAD14‘
            const label = obj.label || ‘‘;
            return (
              <div>
                  <div className={styles.reportDot } style={{ background }} />
                  <span>{label}</span>
              </div>
            );
       },
      },

less

.reportDot {
  width: 8px;
  height: 8px;
  border-radius: 8px;
  border: 1px solid #fff;
  margin-right: 8px;
  display: inline-block;
}

  

以上是关于标题前点的制作的主要内容,如果未能解决你的问题,请参考以下文章