mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
docs(menu): remove submenu section, use option is enough
This commit is contained in:
parent
84e60ca857
commit
fc83eb3857
@ -34,7 +34,7 @@ long-label
|
||||
| icon-size | `number` | `20` | The icon size when menu is not collapsed. |
|
||||
| indent | `number` | `32` | The indent of menu. |
|
||||
| inverted | `boolean` | `false` | Use inverted style. |
|
||||
| options | `Array<MenuOption \| Submenu \| MenuOptionGroup>` | `[]` | Items data of menu. |
|
||||
| options | `Array<MenuOption \| MenuOptionGroup>` | `[]` | Items data of menu. |
|
||||
| mode | `'vertical' \| 'horizontal'` | `'vertical'` | Menu layout. |
|
||||
| render-label | `(option: MenuOption \| MenuGroupOption) => VNodeChild` | `undefined` | Render function that renders all labels. |
|
||||
| root-indent | `number` | `undefined` | The indent of menu's first level children. If not set, menu will use `indent` in place of it. |
|
||||
@ -46,28 +46,18 @@ long-label
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| children? | `Array<MenuOption \| MenuOptionGroup>` | Child menu options. |
|
||||
| disabled? | `boolean` | Whether to disable the menu item. |
|
||||
| extra? | `string \| (() => VNodeChild)` | The extra parts of the menu item. |
|
||||
| icon? | `() => VNodeChild` | The icon for the menu item. |
|
||||
| key | `string` | The indentifier of the menu item. |
|
||||
| label | `string \| (() => VNodeChild)` | The label of the menu item. |
|
||||
|
||||
### Submenu Properties
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| children | `Array<MenuOption \| Submenu \| MenuOptionGroup>` | Submenu child items. |
|
||||
| disabled? | `boolean` | Whether to disable the submenu. |
|
||||
| extra? | `string \| (() => VNodeChild)` | The extra parts of the menu item. |
|
||||
| icon? | `() => VNodeChild` | The icon for the submenu item. |
|
||||
| key | `string` | The indentifier of the submenu. |
|
||||
| label | `string \| (() => VNodeChild)` | The label of the menu item. |
|
||||
|
||||
### MenuOptionGroup Properties
|
||||
|
||||
| Name | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| children | `Array<MenuOption \| Submenu \| MenuOptionGroup>` | Group items. **required!** |
|
||||
| children | `Array<MenuOption \| MenuOptionGroup>` | Group items. **required!** |
|
||||
| key | `string` | The indentifier of the menu group. |
|
||||
| label | `string \| (() => VNodeChild)` | The label of the menu item. |
|
||||
| type | `'group'` | The type of the menu item, **required!** |
|
||||
|
@ -34,7 +34,7 @@ long-label
|
||||
| icon-size | `number` | `20` | 菜单未折叠时图标的大小 |
|
||||
| indent | `number` | `32` | 菜单每级的缩进 |
|
||||
| inverted | `boolean` | `false` | 使用反转样式 |
|
||||
| options | `Array<MenuOption \| Submenu \| MenuOptionGroup>` | `[]` | 菜单的数据 |
|
||||
| options | `Array<MenuOption \| MenuOptionGroup>` | `[]` | 菜单的数据 |
|
||||
| mode | `'vertical' \| 'horizontal'` | `'vertical'` | 菜单的布局方式 |
|
||||
| render-label | `(option: MenuOption \| MenuGroupOption) => VNodeChild` | `undefined` | 批量处理菜单渲染 |
|
||||
| root-indent | `number` | `32` | 菜单第一级的缩进,如果没有设定,使用 `indent` 代替 |
|
||||
@ -45,29 +45,19 @@ long-label
|
||||
### Menu Properties
|
||||
|
||||
| 名称 | 类型 | 说明 |
|
||||
| --------- | ------------------------------ | ---------------- |
|
||||
| --------- | -------------------------------------- | ---------------- |
|
||||
| children? | `Array<MenuOption \| MenuOptionGroup>` | 子选项 |
|
||||
| disabled? | `boolean` | 是否禁用菜单项 |
|
||||
| extra? | `string \| (() => VNodeChild)` | 菜单项的额外部分 |
|
||||
| icon? | `() => VNode` | 菜单项的图标 |
|
||||
| key | `string` | 菜单项的标识符 |
|
||||
| label | `string \| (() => VNodeChild)` | 菜单项的内容 |
|
||||
|
||||
### Submenu Properties
|
||||
|
||||
| 名称 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| children | `Array<MenuOption \| Submenu \| MenuOptionGroup>` | 子菜单 |
|
||||
| disabled? | `boolean` | 是否禁用菜单项 |
|
||||
| extra? | `string \| (() => VNodeChild)` | 菜单项的额外部分 |
|
||||
| icon? | `() => VNodeChild` | 菜单项的图标 |
|
||||
| key | `string` | 菜单项的标识符 |
|
||||
| label | `string \| (() => VNodeChild)` | 菜单项的内容 |
|
||||
|
||||
### MenuOptionGroup Properties
|
||||
|
||||
| 名称 | 类型 | 说明 |
|
||||
| --- | --- | --- |
|
||||
| children | `Array<MenuOption \| Submenu \| MenuOptionGroup>` | 子菜单,**必填!** |
|
||||
| -------- | -------------------------------------- | ------------------------ |
|
||||
| children | `Array<MenuOption \| MenuOptionGroup>` | 子菜单,**必填!** |
|
||||
| key | `string` | 菜单项的标识符 |
|
||||
| label | `string \| (() => VNodeChild)` | 菜单项的内容 |
|
||||
| type | `'group'` | 菜单项的类型,**必填!** |
|
||||
|
Loading…
Reference in New Issue
Block a user