Sanakey
2020-08-13 d98d05000c3d14e1f12a7754ebeea11ec1fa0f0b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" />
 
<view class="van-dropdown-menu van-dropdown-menu--top-bottom">
  <view
    wx:for="{{ itemListData }}"
    wx:key="index"
    data-index="{{ index }}"
    class="{{ utils.bem('dropdown-menu__item', { disabled: item.disabled }) }}"
    bind:tap="onTitleTap"
  >
    <view
      class="{{ item.titleClass }} {{ utils.bem('dropdown-menu__title', { active: item.showPopup, down: item.showPopup === (direction === 'down') }) }}"
      style="{{ item.showPopup ? 'color:' + activeColor : '' }}"
    >
      <view class="van-ellipsis">
        {{ computed.displayTitle(item) }}
      </view>
    </view>
  </view>
 
  <slot />
</view>