fix:[FL-207][文件视图改为列表样式]
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
@@ -821,7 +821,7 @@ export default function AtpModelsPage() {
|
|||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ maxHeight: `${tableScrollY}px`, overflow: "auto" }}>
|
<div style={{ maxHeight: `${tableScrollY}px`, overflow: "auto", border: "1px solid #f0f0f0", borderRadius: "4px" }}>
|
||||||
{assetsQuery.isLoading || assetsQuery.isFetching ? (
|
{assetsQuery.isLoading || assetsQuery.isFetching ? (
|
||||||
<div style={{ textAlign: "center", padding: "40px 0" }}>
|
<div style={{ textAlign: "center", padding: "40px 0" }}>
|
||||||
<Spin tip="加载中..." />
|
<Spin tip="加载中..." />
|
||||||
@@ -832,36 +832,48 @@ export default function AtpModelsPage() {
|
|||||||
description="当前目录为空"
|
description="当前目录为空"
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div style={{ display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))", gap: "16px" }}>
|
<div>
|
||||||
{fileViewItems.map((item, index) =>
|
{fileViewItems.map((item, index) =>
|
||||||
item.type === "folder" ? (
|
item.type === "folder" ? (
|
||||||
<Card
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
hoverable
|
|
||||||
onClick={() => handleFileViewItemClick(item)}
|
onClick={() => handleFileViewItemClick(item)}
|
||||||
style={{ cursor: "pointer" }}
|
style={{
|
||||||
bodyStyle={{ padding: "16px" }}
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
padding: "12px 16px",
|
||||||
|
cursor: "pointer",
|
||||||
|
borderBottom: index < fileViewItems.length - 1 ? "1px solid #f0f0f0" : "none",
|
||||||
|
transition: "background-color 0.2s",
|
||||||
|
}}
|
||||||
|
onMouseEnter={(e) => {
|
||||||
|
e.currentTarget.style.backgroundColor = "#f5f5f5";
|
||||||
|
}}
|
||||||
|
onMouseLeave={(e) => {
|
||||||
|
e.currentTarget.style.backgroundColor = "transparent";
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div style={{ display: "flex", flexDirection: "column", alignItems: "center", gap: "8px" }}>
|
<FolderOutlined style={{ fontSize: "20px", color: "#faad14", marginRight: "12px" }} />
|
||||||
<FolderOutlined style={{ fontSize: "48px", color: "#faad14" }} />
|
<Typography.Text style={{ flex: 1 }}>{item.displayName}</Typography.Text>
|
||||||
<Typography.Text ellipsis={{ tooltip: item.displayName }} style={{ width: "100%", textAlign: "center" }}>
|
</div>
|
||||||
{item.displayName}
|
|
||||||
</Typography.Text>
|
|
||||||
</div>
|
|
||||||
</Card>
|
|
||||||
) : (
|
) : (
|
||||||
<Card
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
bodyStyle={{ padding: "16px" }}
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
padding: "12px 16px",
|
||||||
|
borderBottom: index < fileViewItems.length - 1 ? "1px solid #f0f0f0" : "none",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<div style={{ display: "flex", flexDirection: "column", alignItems: "center", gap: "8px" }}>
|
<FileOutlined style={{ fontSize: "20px", color: "#1890ff", marginRight: "12px" }} />
|
||||||
<FileOutlined style={{ fontSize: "48px", color: "#1890ff" }} />
|
<div style={{ flex: 1, display: "flex", alignItems: "center", justifyContent: "space-between" }}>
|
||||||
<Typography.Text ellipsis={{ tooltip: item.displayName }} style={{ width: "100%", textAlign: "center" }}>
|
<div style={{ display: "flex", flexDirection: "column" }}>
|
||||||
{item.displayName}
|
<Typography.Text>{item.displayName}</Typography.Text>
|
||||||
</Typography.Text>
|
<Typography.Text type="secondary" style={{ fontSize: "12px" }}>
|
||||||
<Typography.Text type="secondary" style={{ fontSize: "12px" }}>
|
{item.item && formatDateTime(item.item.update_date)}
|
||||||
{item.item && formatDateTime(item.item.update_date)}
|
</Typography.Text>
|
||||||
</Typography.Text>
|
</div>
|
||||||
{item.item && (
|
{item.item && (
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
title="删除模型"
|
title="删除模型"
|
||||||
@@ -878,7 +890,7 @@ export default function AtpModelsPage() {
|
|||||||
</Popconfirm>
|
</Popconfirm>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</div>
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user