wxbutton.wxml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <!--pages/components/wxbutton/wxbutton.wxml-->
  2. <view wx:if="{{item_data.show_data==='getUserInfo'}}" bind:getuserinfon="onGetUserInfoParent">
  3. <button class="btn" open-type="getUserInfo" bindgetuserinfo="onGetUserInfo">
  4. <image mode="widthFix" src="{{item_data.image}}" style="width:'100%'; height:'100%';">
  5. </image>
  6. </button>
  7. </view>
  8. <view wx:elif="{{item_data.show_data==='getPhoneNumber'}}">
  9. <button class="btn" open-type="getPhoneNumber" bindgetuserinfo="onGetPhoneNumber">
  10. <image mode="widthFix" src="{{item_data.image}}" style="width:'100%'; height:'100%';"></image>
  11. </button>
  12. </view>
  13. <view wx:elif="{{item_data.show_data==='contact'}}">
  14. <button class="btn" open-type="contact" bindgetuserinfo="onContact">
  15. <image mode="widthFix" src="{{item_data.image}}" style="width:'100%'; height:'100%';"></image>
  16. </button>
  17. </view>
  18. <view wx:elif="{{item_data.show_data==='share'}}">
  19. <button class="btn" open-type="share" bindgetuserinfo="onShare">
  20. <image mode="widthFix" src="{{item_data.image}}" style="width:'100%'; height:'100%';"></image>
  21. </button>
  22. </view>
  23. <view wx:elif="{{item_data.show_data==='launchApp'}}">
  24. <button class="btn" open-type="launchApp" bindgetuserinfo="onLaunchApp">
  25. <image mode="widthFix" src="{{item_data.image}}" style="width:'100%'; height:'100%';"></image>
  26. </button>
  27. </view>
  28. <view wx:elif="{{item_data.show_data==='openSetting'}}">
  29. <button class="btn" open-type="openSetting" bindgetuserinfo="onOpenSetting">
  30. <image mode="widthFix" src="{{item_data.image}}" style="width:'100%'; height:'100%';"></image>
  31. </button>
  32. </view>
  33. <view wx:elif="{{item_data.show_data==='feedback'}}">
  34. <button class="btn" open-type="feedback" bindgetuserinfo="onFeedback">
  35. <image mode="widthFix" src="{{item_data.image}}" style="width:'100%'; height:'100%';"></image>
  36. </button>
  37. </view>