Attachments

随提示词发送的文件:图片显示为缩略图,其他文件显示名称,等待发送时各带一个移除按钮。

查看源码
  • receipt-northwind.svg
  • settings-screen.svg
  • invoice-2026-10.pdf
  • standup-notes.m4a
import { Attachments } from "@logicplanes/kaeso-ui/playground";

属性

  • align
    "start" | "end" = start

    这一行的对齐方式:靠开头(在输入框中)或靠末尾(在已发送的提示词上方)。

  • aria-label
    string

    列表的无障碍名称(默认为“附件”)。

  • items
    readonly Attachment[]

    这些文件:ID、名称、媒体类型,图片还需一个用来绘制它的 blob: 或 data: URL。

  • onRemove
    ((id: string) => void)

    按 ID 移除文件:每个缩略图和标签上都有一个以文件命名的移除按钮。