index.ttml
2.77 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<template name="zan-actionsheet">
<view class="zan-actionsheet {{ show ? 'zan-actionsheet--show' : '' }}">
<view
class="zan-actionsheet__mask"
catchtap="_handleZanActionsheetMaskClick"
data-close-on-click-overlay="{{ closeOnClickOverlay }}"
data-component-id="{{ componentId }}"></view>
<view class="zan-actionsheet__container">
<!-- 实际按钮显示 -->
<button
wx:if = "{{!isNewShareStyle}}"
wx:for="{{ actions }}"
wx:for-index="index"
wx:for-item="item"
wx:key="{{ index }}-{{ item.name }}"
catchtap="_handleZanActionsheetBtnClick"
data-component-id="{{ componentId }}"
data-index="{{ index }}"
open-type="{{ item.openType }}"
class="zan-btn zan-actionsheet__btn {{ item.loading ? 'zan-btn--loading' : '' }} {{ item.className }}"
>
<text>{{ item.name }}</text>
<text
wx:if="{{ item.subname }}"
class="zan-actionsheet__subname">{{ item.subname }}</text>
</button>
<!--图标分享按钮-->
<view wx:if='{{isNewShareStyle}}' class='share_new_container'>
<!--联盟用户 资源位-->
<view class='share_union_soruce_img_container'>
<image src="{{unionUserImageUrl? unionUserImageUrl:'http://img13.static.yhbimg.com/article/2018/07/05/11/0204b2cb17aebf4ca33557392bb29e0807.jpg'}}" catchtap='_handlerJumpByUrl' class='share_union_soruce_img'></image>
</view>
<!--分享的图标及文字容器-->
<view class='share-icon-container'>
<block wx:for='{{actions}}'
wx:key="{{ index }}-{{ item.name }}"
wx:for-index="index"
wx:for-item="item">
<view class='share-icon-text-container'>
<view class='share-image-button'>
<image src='{{item.image_src}}' style='width:100%;height:100%;'></image>
<!--使用button是为了使用 open-type属性-->
<button class='share-btn'
catchtap="_handleZanActionsheetBtnClick"
data-component-id="{{ componentId }}"
data-index="{{ index }}"
open-type="{{ item.openType }}"></button>
</view>
<view class='share-explain-text'>{{item.name}}</view>
</view>
</block>
</view>
<!-- 分割线 -->
<view class='divide-line'></view>
</view>
<!-- 关闭按钮 -->
<view
wx:if="{{ cancelText }}"
class="zan-actionsheet__footer"
>
<button
class="zan-btn zan-actionsheet__btn"
catchtap="_handleZanActionsheetCancelBtnClick"
data-component-id="{{ componentId }}"
>{{ cancelText }}</button>
</view>
</view>
</view>
</template>