parts | ComponentPartsOf<{ Button: typeof Button }> | — | parts={{ Button: { size: "sm" } }} | 配置默认内置删除按钮的公开 Props(如 size、class、style);删除事件、可访问名称和角色仍由组件控制,不影响外置子项。 |
value | string | — | value="guides" | 选项值(通过 as="item" 接入 Listbox 时必填且同一列表内唯一;独立使用时作为选择意图事件的业务标识) |
singleLine | boolean | true | singleLine | 普通菜单标签内部复用Frame单行预设,保持附件Hug与最小4 CSS px间距;复杂多行children可显式false并由其内容owner排版。长标签用Text lines=1提供截断和全文。 |
selected | boolean | false | selected | 是否选中(独立使用时有效;使用 as="item" 接入 Listbox 后由宿主覆盖) |
active | boolean | false | active | 是否高亮(独立使用时有效;使用 as="item" 接入 Listbox 后由宿主覆盖) |
disabled | boolean | false | disabled | 是否禁用(opacity 0.2,阻止点击) |
showCheck | boolean | — | showCheck | 是否渲染 trailing 勾选槽位;未设置时仅独立 selected 项默认开启,Listbox 默认关闭,Select 默认开启 |
closeOnSelect | boolean | — | closeOnSelect | 点击后是否请求父级浮层关闭;未设置时由父级浮层决定默认策略 |
children | Snippet | — | <MenuItem as="item" value="guides"><Icon as="leading" icon={BookOpen} />Guides</MenuItem> | 无参数的操作项内容;直系 as="leading" / as="trailing" 子项会参与根级三槽位布局 |