IndexList.wxml
1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<popup title="{{listType == 0 ?'选择城市':'选择品牌'}}" show="{{show}}" bindconfirm="confirm" height="{{viewHeight}}">
<view class="car-brands-box">
<search-input bindsearch="search"></search-input>
<view class="car-brands">
<scroll-view style="height:100%;" scroll-y scroll-into-view="{{letter}}">
<block wx:if="{{list.length}}">
<block wx:for="{{list}}" wx:key="index">
<view id="{{item.letter}}">
<view class="title y-center">{{item.letter}}</view>
<view class="box">
<block wx:for="{{item.list}}" wx:for-item="i" wx:key="ind" wx:for-index="ind">
<view class="brands" catchtap="choose" data-index='{{index}}' data-ind='{{ind}}' data-item="{{i}}">
<view class="list y-center {{i.active?'active':''}}">
<block wx:if="{{i.brandImage || i.logoUrl}}">
<view class="icon">
<image webp src="{{i.brandImage || i.logoUrl}}"></image>
</view>
</block>
{{i.name || i.brandName || i.vehicleSubBrandName}}
</view>
</view>
</block>
</view>
</view>
</block>
</block>
<block wx:else>
<view class="nothing">暂无数据</view>
</block>
</scroll-view>
<block wx:if="{{!isSearch}}">
<view class="side-bar" id="side-bar">
<block wx:for="{{list}}" wx:key="index">
<view data-letter="{{item.letter}}" class="view {{item.active?'active':''}}" capture-catch:touchstart="start" id="letter-{{item.letter}}" data-index="{{index}}" capture-catch:touchmove="move" capture-catch:touchend="end">{{item.letter}}
</view>
</block>
</view>
</block>
<!-- 提示 -->
<view class='tips' hidden='{{!showTip}}'>{{letter}}</view>
</view>
</view>
</popup>