|
6 | 6 |
|
7 | 7 | <p align="center"><a href="./README.md">English</a> | 简体中文</p> |
8 | 8 |
|
9 | | - |
10 | 9 | <div align="center"> |
11 | 10 |
|
12 | 11 | [![NPM version][npm-image]][npm-url] [![npm download][download-image]][download-url] [![build status][github-actions-image]][github-actions-url] [![Codecov][codecov-image]][codecov-url] [![bundle size][bundlephobia-image]][bundlephobia-url] [![dumi][dumi-image]][dumi-url] |
13 | 12 |
|
14 | 13 | </div> |
15 | 14 |
|
16 | | - |
17 | 15 | ## 特性 |
18 | 16 |
|
19 | 17 | - 水平、垂直和内联菜单模式。 |
@@ -98,9 +96,9 @@ npm start |
98 | 96 | | inlineCollapsed | `boolean` | - | 折叠内联菜单布局。 | |
99 | 97 | | inlineIndent | `number` | `24` | 内联模式的缩进宽度。 | |
100 | 98 | | itemIcon | `ReactNode \| (props: RenderIconInfo) => ReactNode` | - | 自定义项目图标。 | |
101 | | -| 项目 | `ItemType[]` | - | 菜单项配置。 | |
| 99 | +| items | `ItemType[]` | - | 菜单项配置。 | |
102 | 100 | | mode | `'horizontal' \| 'vertical' \| 'inline'` | `vertical` | Menu display mode. | |
103 | | -| 运动 | `CSSMotionProps` | - | 菜单转换的运动配置。 | |
| 101 | +| motion | `CSSMotionProps` | - | 菜单转换的运动配置。 | |
104 | 102 | | multiple | `boolean` | `false` | 允许选择多个项目。 | |
105 | 103 | | openKeys | `string[]` | - | 受控打开子菜单键。 | |
106 | 104 | | overflowedIndicator | `ReactNode` | `"..."` | 为溢出项目呈现的指示器。 | |
@@ -151,11 +149,11 @@ type ItemType = |
151 | 149 |
|
152 | 150 | ### Ref |
153 | 151 |
|
154 | | -| Method | 类型 | 说明 | |
155 | | -| --- | --- | --- | |
156 | | -| `focus` | `(options?: FocusOptions) => void` | 聚焦活动项目或第一个启用的项目。 | |
157 | | -| `findItem` | `({ key: string }) => HTMLElement \| null` | 查找项目键的 DOM 元素。 | |
158 | | -| `list` | `HTMLUListElement` | 根菜单列表元素。 | |
| 152 | +| Method | 类型 | 说明 | |
| 153 | +| ---------- | ------------------------------------------ | -------------------------------- | |
| 154 | +| `focus` | `(options?: FocusOptions) => void` | 聚焦活动项目或第一个启用的项目。 | |
| 155 | +| `findItem` | `({ key: string }) => HTMLElement \| null` | 查找项目键的 DOM 元素。 | |
| 156 | +| `list` | `HTMLUListElement` | 根菜单列表元素。 | |
159 | 157 |
|
160 | 158 | ## 本地开发 |
161 | 159 |
|
|
0 commit comments