添加新的骨架屏,将评查点列表和评查文件列表,文档列表进行数据分类
This commit is contained in:
@@ -9,6 +9,7 @@ import { Pagination } from "~/components/ui/Pagination";
|
||||
import { Table } from "~/components/ui/Table";
|
||||
import { StatusBadge } from "~/components/ui/StatusBadge";
|
||||
import { FileTypeTag, links as fileTypeTagLinks } from "~/components/ui/FileTypeTag";
|
||||
import { NumberSkeleton, TableRowSkeleton, LoadingIndicator } from "~/components/ui/SkeletonScreen";
|
||||
import rulesFilesStyles from "~/styles/pages/rules-files.css?url";
|
||||
import {
|
||||
getReviewFiles,
|
||||
@@ -541,7 +542,11 @@ export default function RulesFiles() {
|
||||
<div className="flex items-center ml-4 bg-white px-3 py-1 rounded-md">
|
||||
<i className="ri-file-list-3-line text-primary text-lg mr-1"></i>
|
||||
<span className="text-sm text-secondary">总文件数:</span>
|
||||
<span className="text-base font-normal text-primary ml-1">{totalCount}</span>
|
||||
{isLoading ? (
|
||||
<NumberSkeleton className="ml-1" />
|
||||
) : (
|
||||
<span className="text-base font-normal text-primary ml-1">{totalCount}</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<Button type="primary" icon="ri-file-upload-line" to="/files/upload">
|
||||
@@ -622,13 +627,19 @@ export default function RulesFiles() {
|
||||
{/* 文件列表 */}
|
||||
<Card>
|
||||
<div className={isLoading ? "opacity-70 pointer-events-none transition-opacity" : ""}>
|
||||
<Table
|
||||
columns={columns}
|
||||
dataSource={files}
|
||||
rowKey="id"
|
||||
emptyText="暂无文件数据"
|
||||
className="files-table table-auto-height"
|
||||
/>
|
||||
{isLoading && <LoadingIndicator />}
|
||||
|
||||
{isLoading && files.length === 0 ? (
|
||||
<TableRowSkeleton count={5} />
|
||||
) : (
|
||||
<Table
|
||||
columns={columns}
|
||||
dataSource={files}
|
||||
rowKey="id"
|
||||
emptyText={isLoading ? "加载中..." : "暂无文件数据"}
|
||||
className="files-table table-auto-height"
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* 分页组件 */}
|
||||
{totalCount > 0 && (
|
||||
|
||||
Reference in New Issue
Block a user