Commit de919d91 authored by nick zheng's avatar nick zheng

Merge branch 'beta' into 'master'

chore: 知识库文档显示图标

See merge request !233
parents 6ebccc30 7fc31a53
...@@ -140,7 +140,18 @@ export function createKnowledgeDocumentColumn( ...@@ -140,7 +140,18 @@ export function createKnowledgeDocumentColumn(
}, },
width: 316, width: 316,
render(row: KnowledgeDocumentItem) { render(row: KnowledgeDocumentItem) {
return row.documentName || '--' const type = row.documentUrl.substring(row.documentUrl.lastIndexOf('.') + 1)
const documentIcon = `https://gsst-poe-sit.gz.bcebos.com/icon/${type}.svg`
return (
<div class='flex items-center gap-[10px]'>
<div
class='h-[22px] w-[22px] flex-shrink-0 bg-contain bg-no-repeat'
style={{ backgroundImage: `url(${documentIcon})` }}
/>
<NEllipsis class='flex-1'>{row.documentName || '--'}</NEllipsis>
</div>
)
}, },
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment