feat: add dataset item images

This commit is contained in:
2026-07-23 23:15:43 +08:00
parent fbd142803a
commit 56d96f23dd
9 changed files with 109 additions and 15 deletions

View File

@@ -965,6 +965,15 @@
margin-bottom: 24px;
}
.explore-article-image {
display: block;
width: 100%;
max-height: 420px;
margin: 0 0 24px;
border-radius: 12px;
object-fit: cover;
}
.explore-article-content {
margin: 0;
color: var(--senlin-text);

View File

@@ -24,6 +24,7 @@ export type DatasetItemDTO = {
summary: string
content: string
url: string
imageUrl: string
status: 'unread' | 'read' | 'archived'
starred: boolean
publishedAt: string | null

View File

@@ -445,6 +445,9 @@ export function WorkspaceExplorePage({
<Text type="secondary">{selectedSource.name}</Text>
<Text type="secondary">{itemTime(selected)}</Text>
</Space>
{selected.imageUrl ? (
<img className="explore-article-image" src={selected.imageUrl} alt="" />
) : null}
<Paragraph className="explore-article-content">{selected.content || selected.summary || '暂无正文'}</Paragraph>
</article>
</Card>