index.axml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <import-sjs
  2. from="./index.sjs"
  3. name="utils" />
  4. <button
  5. form-type="{{ formType }}"
  6. hover-class="{{ utils.getHoverClass(loading, type, activeClassName) }}"
  7. scope="{{ scope }}"
  8. onTap="{{ onTap ? 'onTap' : '' }}"
  9. onGetAuthorize="onGetAuthorize"
  10. onFollowLifestyle="onFollowLifestyle"
  11. onError="onError"
  12. onGetUserInfo="onGetUserInfo"
  13. onGetPhoneNumber="onGetPhoneNumber"
  14. catchTap="{{ catchTap ? 'catchTap' : '' }}"
  15. public-id="{{ publicId }}"
  16. open-type="{{ openType }}"
  17. class="ant-button {{ inline ? 'ant-button-inline ' + utils.getClass(size) : '' }} {{ 'ant-button-' + type + (danger ? '-danger' : '') }} {{ disabled || loading ? 'ant-button-disabled' : '' }} {{ className ? className : '' }}"
  18. style="{{ style }}">
  19. <view class="ant-button-wrap">
  20. <ant-icon
  21. a:if="{{ !!icon }}"
  22. type="{{ icon }}" />
  23. <view
  24. class="ant-button-content-text {{ icon ? 'ant-button-content-text-margin' : '' }}">
  25. <slot />
  26. <view
  27. a:if="{{ !inline && subText }}"
  28. class="ant-button-content-subtext">
  29. {{ subText }}
  30. </view>
  31. </view>
  32. <view
  33. a:if="{{ loading }}"
  34. class="ant-button-content-loading-container">
  35. <loading
  36. type="mini"
  37. color="currentColor"
  38. className="ant-button-content-loading" />
  39. </view>
  40. </view>
  41. </button>