IndexList 索引列表
注意
该组件的子组件只能是c-index-list-anchor、c-index-list-item组件。
平台
| App | 小程序 | H5 |
|---|---|---|
| √ | √ | √ |
属性
| 属性名 | 类型 | 默认值 | 说明 | 平台 |
|---|---|---|---|---|
| indexListInCenter | Boolean | true | 索引列表位置是否居中 | All |
| indexListStyle | Object | {} | 索引列表样式 | All |
| indexColor | String | c-t-main | 索引颜色 支持c-t-开头的颜色类 | All |
| activeIndexColor | String | #fff | 选中索引的颜色 支持c-t-开头的颜色类 | All |
| activeIndexBgColor | String | c-bg-primary | 选中背景颜色 支持c-bg-开头的颜色类 | All |
| cClass | String,Array,Object | null | 组件类 | All |
| cStyle | String,Array,Object | null | 组件样式 | All |
| margin | String,Number,Array | null | 外边距 | All |
| padding | String,Number,Array | null | 内边距 | All |
| bgColor | String | null | 背景色,支持c-bg-开头的背景色类 | All |
插槽
| 插槽名 | 说明 |
|---|---|
| default | 子组件只能是c-index-list-anchor、c-index-list-item |
示例
vue
<template>
<c-page>
<c-index-list>
<c-index-list-anchor bgColor="c-bg-base" indexName="A">
<c-text text="A" />
</c-index-list-anchor>
<c-index-list-item>
<c-text text="安徽" />
</c-index-list-item>
<c-index-list-anchor bgColor="c-bg-base" indexName="B">
<c-text text="B" />
</c-index-list-anchor>
<c-index-list-item>
<c-text text="北京" />
</c-index-list-item>
</c-index-list>
</c-page>
</template>
<script>
</script>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
