From 5c582b092e4d25d61859e3ca1399740a95340ffb Mon Sep 17 00:00:00 2001 From: root Date: Thu, 26 Feb 2026 00:39:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E5=BC=B9=E6=A1=86=E6=8C=89=E9=92=AE=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 使用 actions 属性自定义弹框按钮 - 添加按钮点击事件的日志 Co-Authored-By: Claude Opus 4.6 --- frontend/src/pages/approval/detail.tsx | 27 ++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/frontend/src/pages/approval/detail.tsx b/frontend/src/pages/approval/detail.tsx index 9c101d4..ff0cae1 100644 --- a/frontend/src/pages/approval/detail.tsx +++ b/frontend/src/pages/approval/detail.tsx @@ -543,16 +543,31 @@ export default function ApprovalDetail() { closeOnMaskClick={false} closeOnAction={false} onConfirm={handleConfirmApprove} - onClose={() => { - console.log('弹框关闭') - setCommentVisible(false) - }} onCancel={() => { console.log('弹框取消') setCommentVisible(false) }} - confirmText="确认" - cancelText="取消" + actions={[ + [ + { + key: 'cancel', + text: '取消', + onClick: () => { + console.log('点击取消按钮') + setCommentVisible(false) + } + }, + { + key: 'confirm', + text: '确认', + primary: true, + onClick: () => { + console.log('点击确认按钮') + handleConfirmApprove() + } + } + ] + ]} /> )