Skip to content

Commit cbadb7d

Browse files
committed
mp-baidu: index-list
1 parent 5ec5b39 commit cbadb7d

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎pages/tabBar/template/template.vue‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,10 @@
117117
url: 'list-triplex-row'
118118
}]
119119
},
120-
// #ifndef MP-BAIDU
121120
{
122121
name: '右侧索引列表 indexList',
123122
url: 'index-list'
124123
},
125-
// #endif
126124
{
127125
name: '图文列表',
128126
url: 'media-list'

‎pages/template/index-list/index-list.vue‎

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22
<view class="page">
33
<scroll-view class="scrollList" scroll-y :scroll-into-view="scrollViewId" :style="{height:winHeight + 'px'}">
44
<view class="uni-list">
5-
<block v-for="(list,key) in lists" :key="key" v-if="list.data[0]">
6-
<view class="uni-list-cell-divider" :id="list.letter">
7-
{{list.letter}}
8-
</view>
9-
<view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(item,index) in list.data" :key="index"
10-
:class="list.data.length -1 == index ? 'uni-list-cell-last' : ''">
11-
<view class="uni-list-cell-navigate">
12-
{{item}}
5+
<block v-for="(list, key) in lists" :key="key">
6+
<block v-if="list.data.length">
7+
<view class="uni-list-cell-divider" :id="list.letter">
8+
{{list.letter}}
139
</view>
14-
</view>
10+
<view class="uni-list-cell" hover-class="uni-list-cell-hover" v-for="(item,index) in list.data" :key="index"
11+
:class="list.data.length -1 == index ? 'uni-list-cell-last' : ''">
12+
<view class="uni-list-cell-navigate">
13+
{{item}}
14+
</view>
15+
</view>
16+
</block>
1517
</block>
1618
</view>
1719
</scroll-view>

0 commit comments

Comments
 (0)