优化按钮组件,统一使用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%",
render: (_: unknown, file: ReviewFileUI) => (
<div className="flex flex-wrap gap-1">
<Button
type="default"
size="small"
icon="ri-eye-line"
<button
type="button"
onClick={() => handleReviewFileClick(file.id, file.auditStatus)}
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' && (
<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={() => {
setSelectedDocumentId(file.id);
setShowAttachmentUpload(true);
@@ -678,15 +677,14 @@ export default function RulesFiles() {
</button>
)}
<Button
type="default"
size="small"
icon="ri-download-2-line"
className="mt-1"
<button
type="button"
className="text-xs px-2 py-1 h-7 mr-1 text-gray-500 hover:underline hover:text-gray-700"
onClick={() => handleDownload(file.path)}
>
<i className="ri-download-2-line"></i>
</Button>
</button>
</div>
)
}