ant design Collapse 折叠面板 右上角增加 按钮

 

首先给  Collapse.Panel  添加  extra  属性        (自定义渲染每个面板右上角的内容)

然后在函数中  返回所想要的内容  

const genExtra = () => {
    return (
      <Button
        style={{ color: '#1890FF' }}
        onClick={() => showPolicyHolder(0)}
        type="text"
      >
        OCR识别
      </Button>
    )
  }
代码如下图所示

 

 

效果图:

 

 

posted @ 2022-01-26 15:40  贺可英  阅读(2084)  评论(0)    收藏  举报