Commit 7fc31a53 authored by nick zheng's avatar nick zheng

chore: 知识库文档显示图标

parent 6ebccc30
......@@ -140,7 +140,18 @@ export function createKnowledgeDocumentColumn(
},
width: 316,
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