ModelPicker

来自项目目录的模型:服务商标识、名称和 ID,按服务商分组。位于对比列标题栏的开头。

查看源码
import { ModelPicker } from "@logicplanes/kaeso-ui/playground";

属性

  • appearance
    "ghost" | "default" = ghost

    低调按钮(ghost)或填充按钮(default)。

  • aria-label
    string

    选择器的无障碍名称(默认为“模型”)。

  • defaultValue
    string | null

    首次渲染时的所选模型。

  • disabled
    boolean

    将其禁用:无法使用,并显示为变暗。

  • groupByProvider
    boolean

    按服务商对列表分组(有多个服务商时默认开启)。

  • onValueChange
    ((value: string) => void)

    调用时传入所选模型。

  • options
    ModelPickerOption[]

    可供选择的模型。

  • placeholder
    string

    没有值时显示的文字。

  • size
    "md" | "sm" = sm

    按钮的高度。

  • value
    string | null

    受控时的所选模型。