废话不多说,直接贴代码。。。
<scroll-view scroll-y style="height: {
{windowHeight}}" scroll-into-view="{
{alpha}}">
<view class="alphabet">
<view id="Top" class="header">
<view class="h-city">
<text>北京</text>
</view>
<view class="h-close">
</view>
</view>
<view class="now-city">
<text>定位城市</text>
<text class="now-city-name">北京</text>
</view>
<!-- 26个字母列表内容 -->
<view class="alphabet-list">
<view wx:for="{
{list}}" wx:key="unique" id="{
{item.alphabet}}" class="section-item" wx:if="{
{index!=0}}">
<view class="section-item-header">
{
{item.alphabet}}
</view>
<view wx:for="{
{item.datas}}" wx:key="unique" wx:for-item="cell" wx:for-index="cellIndex" class="section-item-cells">
<view class="section-item-cell {
{cellIndex != (item.datas.length-1) ? 'border-bottom':''}}">
<text>{
{cell}}</text>
</view>
</view>
</view>
</view>
</view>
</scroll-view>