mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 11:10:01 +08:00
docs: update menu developers notes
This commit is contained in:
parent
14521d32d9
commit
27642b23ba
@ -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.
|
||||
|
||||
|
@ -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 组件。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user