For AI agents: the complete documentation index is available at https://docs.halo.run/llms.txt, the full documentation bundle is available at https://docs.halo.run/llms-full.txt, and this page is available as Markdown at https://docs.halo.run/developer-guide/plugin/api-reference/ui/components/attachment-file-type-icon.md.

AttachmentFileTypeIcon

此组件用于根据文件名显示文件类型图标。

使用示例

<script lang="ts" setup></script>

<template>
  <AttachmentFileTypeIcon fileName="example.png" />
</div>

Props

属性名类型默认值描述
fileNamestring | undefinedundefined文件名,可以是字符串或未定义。
displayExtbooleantrue可选,是否显示文件扩展名,默认为 true。
widthnumber10可选,组件宽度,默认为 10。
heightnumber10可选,组件高度,默认为 10。