参考
命令面板 Command
Command:命令面板。页面顶部出现模态浮层,内含搜索字段和调用方传入的命令;命令按组显示,每行有按键提示。外壳使用 dialog 状态机,提供 scrim、焦点陷阱和 Escape;搜索由 combobox 状态机驱动自有列表。容器和列表都在浮层内,combobox 不再渲染单独弹层,状态机内容挂接到浮层列表。input 部件带有一个 `as never`:它的 prop 联合类型超出了 h() 的可解析范围(TS2590)。
Content · Empty · Group · GroupLabel · Input · Item · ItemHint · List · Positioner
#Command
Command:命令面板。页面顶部出现模态浮层,内含搜索字段和调用方传入的命令;命令按组显示,每行有按键提示。外壳使用 dialog 状态机,提供 scrim、焦点陷阱和 Escape;搜索由 combobox 状态机驱动自有列表。容器和列表都在浮层内,combobox 不再渲染单独弹层,状态机内容挂接到浮层列表。input 部件带有一个 as never:它的 prop 联合类型超出了 h() 的可解析范围(TS2590)。
| 属性 | 类型 | 默认值 | 描述 |
|---|---|---|---|
items | Array as PropType<CommandEntry[]> | () => [] | — |
placeholder | String | undefined | — |
open | Boolean | undefined | — |
autoFilter | Boolean | true | — |
inputValue | String | undefined | — |
emptyText | String | "No matching commands" | — |
onSelect | Function as PropType<(value: string) => void> | undefined | — |