Skip to content

Commit

Permalink
docs: update menu developers notes
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Jun 30, 2021
1 parent 14521d3 commit 27642b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/menu/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Navigation is an important part of any website, as a good navigation setup allow

More layouts with navigation: [Layout](/components/layout).

## Notes for developers

- Menu render as `ul` element. So it only support [`li` and `script-supporting` elements](https://html.spec.whatwg.org/multipage/grouping-content.html#the-ul-element) as children node。Your customize node should wrapped by `Menu.Item`.
- Menu need collect node structure. So it's children node should be `Menu.*` or HOC which used by it.

Expand Down
2 changes: 2 additions & 0 deletions components/menu/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ cover: https://gw.alipayobjects.com/zos/alicdn/3XZcjGpvK/Menu.svg

更多布局和导航的使用可以参考:[通用布局](/components/layout)

## 开发者注意事项

- Menu 元素为 `ul`,因而仅支持 [`li` 以及 `script-supporting` 子元素](https://html.spec.whatwg.org/multipage/grouping-content.html#the-ul-element)。因而你的子节点元素应该都在 `Menu.Item` 内使用。
- Menu 需要计算节点结构,因而其子元素仅支持 `Menu.*` 以及对此进行封装的 HOC 组件。

Expand Down

0 comments on commit 27642b2

Please sign in to comment.