mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
36 lines
892 B
Plaintext
36 lines
892 B
Plaintext
<view
|
|
class="tree-select"
|
|
style="height: {{ mainHeight }}px"
|
|
>
|
|
<view class="tree-select__nav">
|
|
<view
|
|
wx:for="{{ items }}"
|
|
wx:key="index"
|
|
class="tree-select__nitem van-ellipsis {{ mainActiveIndex === index ? 'tree-select__nitem--active' : '' }}"
|
|
data-index="{{ index }}"
|
|
bind:tap="onClickNav"
|
|
>
|
|
{{ item.text }}
|
|
</view>
|
|
</view>
|
|
<view
|
|
class="tree-select__content"
|
|
style="height: {{ itemHeight }}px"
|
|
>
|
|
<view
|
|
wx:for="{{ subItems }}"
|
|
wx:key="item.id"
|
|
class="tree-select__item van-ellipsis {{ activeId === item.id ? 'tree-select__item--active' : '' }}"
|
|
data-item="{{ item }}"
|
|
bind:tap="onSelectItem"
|
|
>
|
|
{{ item.text }}
|
|
<van-icon
|
|
wx:if="{{ activeId === item.id }}"
|
|
name="success"
|
|
class="tree-select__selected"
|
|
></van-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|