Skip to content

Commit 0e02fa9

Browse files
committed
refactor(modal): 优化 Modal 组件的关闭逻辑
- 在 Modal 组件中添加 onCancel 属性,用于在用户点击关闭按钮时触发 - 修改 onClose 属性为 onCancel,统一关闭事件处理 - 此修改提高了代码的可读性和一致性,简化了 Modal 组件的使用
1 parent 3547d14 commit 0e02fa9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pages/strategy/list/modal-subscriber.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export default function ModalSubscriber({ open, strategyId = 0, onClose, ...rese
9292
}
9393

9494
return (
95-
<Modal title='订阅者' open={open} onClose={onClose} footer={null} loading={loading} {...reset}>
95+
<Modal title='订阅者' open={open} onClose={onClose} onCancel={onClose} footer={null} loading={loading} {...reset}>
9696
<AutoTable
9797
rowKey={(record) => record.id}
9898
dataSource={datasource}

0 commit comments

Comments
 (0)