优化按钮组件,统一使用button标签,调整样式以提升用户体验。

This commit is contained in:
2025-09-22 20:39:05 +08:00
parent 75969253d0
commit 25c8c75aa5
+11 -13
View File
@@ -655,20 +655,19 @@ export default function RulesFiles() {
width: "20%", width: "20%",
render: (_: unknown, file: ReviewFileUI) => ( render: (_: unknown, file: ReviewFileUI) => (
<div className="flex flex-wrap gap-1"> <div className="flex flex-wrap gap-1">
<Button <button
type="default" type="button"
size="small"
icon="ri-eye-line"
onClick={() => handleReviewFileClick(file.id, file.auditStatus)} onClick={() => handleReviewFileClick(file.id, file.auditStatus)}
disabled={file.status !== 'Processed'} disabled={file.status !== 'Processed'}
className="mr-1" className={`text-xs px-2 py-1 h-7 mr-1 ${file.status === 'Processed' ? 'hover:underline hover:text-primary' : 'opacity-60 cursor-not-allowed pointer-events-none'}`}
> >
<i className="ri-eye-line"></i>
</Button> </button>
{file.fileTypeId === 1 && file.status === 'Processed' && ( {file.fileTypeId === 1 && file.status === 'Processed' && (
<button <button
type="button" type="button"
className="text-xs px-2 py-1 h-7 mr-1 bg-primary text-white hover:bg-primary-dark rounded" className="text-xs px-2 py-1 h-7 mr-1 hover:underline hover:text-primary"
onClick={() => { onClick={() => {
setSelectedDocumentId(file.id); setSelectedDocumentId(file.id);
setShowAttachmentUpload(true); setShowAttachmentUpload(true);
@@ -678,15 +677,14 @@ export default function RulesFiles() {
</button> </button>
)} )}
<Button <button
type="default" type="button"
size="small" className="text-xs px-2 py-1 h-7 mr-1 text-gray-500 hover:underline hover:text-gray-700"
icon="ri-download-2-line"
className="mt-1"
onClick={() => handleDownload(file.path)} onClick={() => handleDownload(file.path)}
> >
<i className="ri-download-2-line"></i>
</Button> </button>
</div> </div>
) )
} }