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