youzan / zent

A collection of essential UI components written with React.
https://youzan.github.io/zent
MIT License
2.25k stars 378 forks source link

feat(pop): support only one action #1990

Closed Sepush closed 11 months ago

Sepush commented 1 year ago

Signed-off-by: Sepush sepush@outlook.com

cpylua commented 1 year ago

看样子是个不兼容改动,会影响现有逻辑。

<Pop
  trigger="click"
  content={
    <span
      style={{
        maxWidth: 100,
        wordBreak: 'break-all',
        display: 'inline-block',
      }}
    >
      12345
    </span>
  }
  onConfirm={this.confirmHandler}
>
  <Button type="primary">打开气泡</Button>
</Pop>
Sepush commented 1 year ago

或许可以通过判断是否为 null 兼容原有逻辑 我下班后改改看