Commit e211cddc3193a296b8ca3b774a221040fddd922f
1 parent
458453d2
分享组件修改
Showing
2 changed files
with
5 additions
and
2 deletions
components/share/share.js
@@ -12,7 +12,10 @@ Component({ | @@ -12,7 +12,10 @@ Component({ | ||
12 | }, | 12 | }, |
13 | set_type(type){ | 13 | set_type(type){ |
14 | this.setData({type:type}) | 14 | this.setData({type:type}) |
15 | - } | 15 | + }, |
16 | + send() { | ||
17 | + this.triggerEvent('send',{},{bubbles: true}); | ||
18 | + }, | ||
16 | 19 | ||
17 | } | 20 | } |
18 | }) | 21 | }) |
19 | \ No newline at end of file | 22 | \ No newline at end of file |
components/share/share.wxml
@@ -2,7 +2,7 @@ | @@ -2,7 +2,7 @@ | ||
2 | <view class="container-wrap animated slideInUp"> | 2 | <view class="container-wrap animated slideInUp"> |
3 | <view class="flex"> | 3 | <view class="flex"> |
4 | <block wx:if="{{type==0}}"> | 4 | <block wx:if="{{type==0}}"> |
5 | - <button open-type="share" class="btn"> | 5 | + <button open-type="share" class="btn" bindtap="send"> |
6 | <view class="icon-container bg-green"><view class="iconfont icon-weixin"></view></view> | 6 | <view class="icon-container bg-green"><view class="iconfont icon-weixin"></view></view> |
7 | <view class="title">发送给好友</view> | 7 | <view class="title">发送给好友</view> |
8 | </button> | 8 | </button> |