fix: 修复审批弹框按钮不显示的问题
- 使用 actions 属性自定义弹框按钮 - 添加按钮点击事件的日志 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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()
|
||||
}
|
||||
}
|
||||
]
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user