[Doc] detailed Array typing

This commit is contained in:
陈嘉涵
2019-07-11 20:44:51 +08:00
parent 019c75506a
commit 2c4adff307
34 changed files with 67 additions and 66 deletions

View File

@@ -50,7 +50,7 @@ export default {
| Attribute | Description | Type | Default |
|------|------|------|------|
| items | Required datasets for the component, see Data Structure for detail. | `Array` | `[]` |
| items | Required datasets for the component | `Item[]` | `[]` |
| height | Height (px) | `number` | `300` |
| main-Active-index | The index of selected parent node | `number` | `0` |
| active-id | Id of selected item | `string | number` | `0` |
@@ -62,7 +62,7 @@ export default {
| navclick | triggered when parent node is selected | index: index of selected parent |
| itemclick | triggered when item is selected | data: selected item |
### Data Structure
### Item Data Structure
`items` should be an array contains specified tree objects.

View File

@@ -50,7 +50,7 @@ export default {
| 参数 | 说明 | 类型 | 默认值 | 版本 |
|------|------|------|------|------|
| items | 分类显示所需的数据,结构参见下方 | `Array` | `[]` | - |
| items | 分类显示所需的数据 | `Item[]` | `[]` | - |
| height | 高度,单位为 px | `number` | `300` | - |
| main-active-index | 左侧导航高亮的索引 | `number` | `0` | - |
| active-id | 右侧选择项高亮的数据id | `string | number` | `0` | - |
@@ -62,7 +62,7 @@ export default {
| navclick | 左侧导航点击时,触发的事件 | index被点击的导航的索引 |
| itemclick | 右侧选择项被点击时,会触发的事件 | data: 该点击项的数据 |
### items 分类显示所需数据的数据结构
### Item 数据结构
`items` 整体为一个数组,数组内包含一系列描述分类的对象。