优化按钮组件,统一使用button标签,调整样式以提升用户体验。
This commit is contained in:
+11
-13
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user