index.wxml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <wxs
  2. src="./index.wxs"
  3. module="utils" />
  4. <button
  5. form-type="{{ formType }}"
  6. hover-class="{{ utils.getHoverClass(loading, type, activeClassName) }}"
  7. scope="{{ scope }}"
  8. bindgetuserinfo="onGetUserInfo"
  9. bindcontact="onContact"
  10. bindgetphonenumber="onGetPhoneNumber"
  11. bindgetrealtimephonenumber="onGetRealTimePhoneNumber"
  12. binderror="onError"
  13. bindlaunchapp="onLaunchApp"
  14. bindopensetting="onOpenSetting"
  15. bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
  16. bindchooseavatar="onChooseAvatar"
  17. public-id="{{ publicId }}"
  18. open-type="{{ openType }}"
  19. class="ant-button {{ inline ? 'ant-button-inline ' + utils.getClass(size) : '' }} {{ 'ant-button-' + type + (danger ? '-danger' : '') }} {{ disabled || loading ? 'ant-button-disabled' : '' }} {{ className ? className : '' }}"
  20. style="{{ style }}">
  21. <view class="ant-button-wrap">
  22. <ant-icon
  23. wx:if="{{ !!icon }}"
  24. type="{{ icon }}" />
  25. <view
  26. class="ant-button-content-text {{ icon ? 'ant-button-content-text-margin' : '' }}">
  27. <slot />
  28. <view
  29. wx:if="{{ !inline && subText }}"
  30. class="ant-button-content-subtext">
  31. {{ subText }}
  32. </view>
  33. </view>
  34. <view
  35. wx:if="{{ loading }}"
  36. class="ant-button-content-loading-container">
  37. <loading
  38. type="mini"
  39. color="currentColor"
  40. className="ant-button-content-loading" />
  41. </view>
  42. </view>
  43. </button>