Skip to content

Commit

Permalink
refactor(modal): 优化 Modal 组件的关闭逻辑
Browse files Browse the repository at this point in the history
- 在 Modal 组件中添加 onCancel 属性,用于在用户点击关闭按钮时触发
- 修改 onClose 属性为 onCancel,统一关闭事件处理
- 此修改提高了代码的可读性和一致性,简化了 Modal 组件的使用
  • Loading branch information
aide-cloud committed Jan 13, 2025
1 parent 3547d14 commit 0e02fa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/strategy/list/modal-subscriber.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default function ModalSubscriber({ open, strategyId = 0, onClose, ...rese
}

return (
<Modal title='订阅者' open={open} onClose={onClose} footer={null} loading={loading} {...reset}>
<Modal title='订阅者' open={open} onClose={onClose} onCancel={onClose} footer={null} loading={loading} {...reset}>
<AutoTable
rowKey={(record) => record.id}
dataSource={datasource}
Expand Down

0 comments on commit 0e02fa9

Please sign in to comment.