diff --git a/components/menu/index.en-US.md b/components/menu/index.en-US.md index e072bd27cf..b72920eef0 100644 --- a/components/menu/index.en-US.md +++ b/components/menu/index.en-US.md @@ -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. diff --git a/components/menu/index.zh-CN.md b/components/menu/index.zh-CN.md index 5458fea7dc..4b369ac460 100644 --- a/components/menu/index.zh-CN.md +++ b/components/menu/index.zh-CN.md @@ -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 组件。