Skip to content

Commit

Permalink
docs: 更新 menu 组件文档 👢👢👢
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyh2001 committed Feb 24, 2023
1 parent 45eb36f commit 9e06e09
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
"listitem",
"maxlength",
"mdit",
"menuitemclick",
"menumode",
"messagecenter",
"messageplacement",
Expand Down Expand Up @@ -181,6 +182,7 @@
"shouqi",
"Similarproducts",
"staplefood",
"submenuclick",
"suoxiao",
"supplie",
"swapchange",
Expand Down
24 changes: 20 additions & 4 deletions docs/components/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,12 @@

## Menu Attributes

| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| ------------- | --------------- | -------------------------------- | -------------------------------- | ---------- |
| `mode` | 不同模式 | <a href="#menumode">MenuMode</a> | `horizontal` `vertical` `inline` | horizontal |
| `active-name` | 默认激活的 name | string / number | —— | —— |
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
| -------------------- | --------------------------- | ------------------------------------------ | -------------------------------- | ---------- |
| `mode` | 不同模式 | <a href="#menumode">MenuMode</a> | `horizontal` `vertical` `inline` | horizontal |
| `active-name` | 默认激活的 name | string / number | —— | —— |
| `on-menu-item-click` | 点击 `f-menu-item` 时的回调 | <a href="#menuitemclick">MenuItemClick</a> | —— | —— |
| `on-submenu-click` | 点击 `f-submenu` 时的回调 | <a href="#submenuclick">SubmenuClick</a> | —— | —— |

## MenuItem Attributes

Expand Down Expand Up @@ -307,6 +309,8 @@ import type {
MenuInstance,
MenuProps,
MenuMode,
MenuItemClick,
SubmenuClick,
MenuItemInstance,
MenuItemProps,
FMenuItemGroup,
Expand All @@ -322,6 +326,18 @@ import type {
type MenuMode = 'horizontal' | 'vertical' | 'inline'
```
### MenuItemClick
```ts
type MenuItemClick = (evt: MouseEvent, name: string) => void
```
### SubmenuClick
```ts
type SubmenuClick = (evt: MouseEvent, target: boolean) => void
```
## Contributors
<a href="https://github.com/Tyh2001" target="_blank">
Expand Down

0 comments on commit 9e06e09

Please sign in to comment.