Browse Source

docs: update api docs of nav

pointhalo 4 years ago
parent
commit
6fcacf0067

+ 2 - 2
content/navigation/navigation/index-en-US.md

@@ -727,7 +727,7 @@ function NavApp (props = {}) {
 | icon         | Navigation project icon name or component                                                                         | ReactNode                                                            |          |         |
 | indent       | If the icon is empty, keep its space or not. Only effective for first level navigation                            | boolean                                                              | false    |         |
 | itemKey      | Navigation project only key                                                                                       | string                                                               | ""       |         |
-| level        | The nesting level of the current item. When limitIndent is true, it is used to customize the indentation position | number                                                               | 1.27.0   |
+| level        | The nesting level of the current item. When limitIndent is true, it is used to customize the indentation position | number                                                               |          | 1.27.0  |
 | link         | Navigation item href link, when imported, the navigation item will be wrapped with an a tag                       | string                                                               | -        | 1.0.0   |
 | linkOptions  | Parameters transparently passed to the a tag                                                                      | object                                                               | -        | 1.0.0   |
 | text         | Navigation project copy or element                                                                                | string \| ReactNode                                                  | ""       |         |
@@ -771,7 +771,7 @@ function NavApp (props = {}) {
 | children       | Sub element                                                                                                                       | ReactNode                                 |         |         |
 | className      | Outermost style name                                                                                                              | string                                    |         |         |
 | collapseButton | Do you show the bottom "put away the sidebar" button, mode = "vertical" and the child parameter of the Footer component is empty? | boolean\|ReactNode                        | false   |         |
-| collapseText   | Title of the collapse button                                                                                                      | (collapsed?:boolean) => string\|ReactNode |         | 0.35.0  |
+| collapseText   | Title of the collapse button                                                                                                      | (collapsed:boolean) => string\|ReactNode |         | 0.35.0  |
 | style          | Outermost style                                                                                                                   | object                                    |         |         |
 
 ## Design Tokens

+ 2 - 2
content/navigation/navigation/index.md

@@ -730,7 +730,7 @@ function NavApp (props = {}) {
 | icon        | 导航项目图标                             | ReactNode |      |               |
 | indent      | 如果 icon 为空,是否保留其占位,仅对一级导航生效       | boolean           | false  |               |
 | itemKey     | 导航项目唯一 key                                   | string            | ""     |               |
-| level       | 当前项所在嵌套层级,limitIndent 为 true时,用于自定义缩进位置| number | 1.27.0 |
+| level       | 当前项所在嵌套层级,limitIndent 为 true时,用于自定义缩进位置| number | | 1.27.0 | 
 | link        | 导航项 href 链接,传入时导航项整体会包裹一个 a 标签 | string            | -      | 1.0.0 |
 | linkOptions | 透传给 a 标签的参数                                | object            | -      | 1.0.0 |
 | text        | 导航项目文案或元素                                 | string\|ReactNode | ""     |               |
@@ -774,7 +774,7 @@ function NavApp (props = {}) {
 | children       | 子元素                                                                                   | ReactNode                                 |        |                |
 | className      | 最外层样式名                                                                             | string                                    |        |                |
 | collapseButton | 是否展示底部“收起侧边栏”按钮,mode="vertical" 且 Footer 组件的 children 参数为空才有效果 | boolean\|ReactNode                        | false  |                |
-| collapseText   | “收起”按钮的文案                                                                         | (collapsed?:boolean) => string\|ReactNode |        | 0.35.0 |
+| collapseText   | “收起”按钮的文案                                                                         | (collapsed:boolean) => string\|ReactNode |        | 0.35.0 |
 | style          | 最外层样式                                                                               | CSSProperties                                    |        |                |
 
 ## 设计变量

+ 3 - 3
content/start/update-to-v2/index-en-US.md

@@ -75,9 +75,9 @@ import en_GB from '@douyinfe/semi-ui/lib/es/locale/source/en_GB'
 - Tooltip no longer supports the `disabled` attribute, and components that rely on Tooltip (such as Popover, Dropdown, etc.) transparently transmitted to Tooltip `disabled` will become invalid
 - Table
   - API that no longer responds when componentDidUpdate
-    - DefaultExpandAllRows, please replace with expandAllRows
-    - Default ExpandRowKeys, please replace with expandRowKeys
-    - Default ExpandAllGroupRows, please replace with expandAllGroupRows
+    - defaultExpandAllRows, please replace with expandAllRows
+    - defaultExpandRowKeys, please replace with expandRowKeys
+    - defaultExpandAllGroupRows, please replace with expandAllGroupRows
 
 ### 🎨 Style incompatibility
 

+ 3 - 1
content/start/update-to-v2/index.md

@@ -66,7 +66,9 @@ import en_GB from '@douyinfe/semi-ui/lib/es/locale/source/en_GB'
   - 自定义 svg 不再支持插件方式配置 srcSvgPaths
   - Button icon 属性不再支持通过 string 传递内置 icon 或 iconType
   - Dropdown 删除 iconType 属性,统一为 icon 属性
-  - Navigation icon 不再支持通过 string 方式传入,需要传入 ReactNode
+  - Navigation 
+    - Nav.item组件, Nav.Sub组件 props.icon 不再支持通过 string 方式传入,需要传入 ReactNode 
+    - Nav 组件props.items 中的 icon也不再支持通过 string 方式传入,需要传入 ReactNode  
   - Notification icon 不再支持通过 string 方式传入,请统一使用 ReactNode
 - AutoComplete 正式废弃 onChangeWithObject 属性
 - Cascader triggerRender 的入参移除 onInputChange