mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
[Doc] detailed Array typing
This commit is contained in:
@@ -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.
|
||||
|
||||
|
@@ -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` 整体为一个数组,数组内包含一系列描述分类的对象。
|
||||
|
||||
|
Reference in New Issue
Block a user