feat: add dataset item images
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -24,6 +24,7 @@ export type DatasetItemDTO = {
|
||||
summary: string
|
||||
content: string
|
||||
url: string
|
||||
imageUrl: string
|
||||
status: 'unread' | 'read' | 'archived'
|
||||
starred: boolean
|
||||
publishedAt: string | null
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user