button.wxml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <button
  2. data-custom="{{ customDataset }}"
  3. class="{{className}} {{prefix}}-class"
  4. form-type="{{type}}"
  5. open-type="{{disabled ? '' : openType}}"
  6. hover-stop-propagation="{{hoverStopPropagation}}"
  7. hover-start-time="{{hoverStartTime}}"
  8. hover-stay-time="{{hoverStayTime}}"
  9. lang="{{lang}}"
  10. session-from="{{sessionFrom}}"
  11. hover-class="{{variant == 'text' ? 'none' : 'button-hover'}}"
  12. send-message-title="{{sendMessageTitle}}"
  13. send-message-path="{{sendMessagePath}}"
  14. send-message-img="{{sendMessageImg}}"
  15. app-parameter="{{appParameter}}"
  16. show-message-card="{{showMessageCard}}"
  17. catch:tap="handleTap"
  18. bind:getuserinfo="getuserinfo"
  19. bind:contact="contact"
  20. bind:getphonenumber="getphonenumber"
  21. bind:error="error"
  22. bind:opensetting="opensetting"
  23. bind:launchapp="launchapp"
  24. bind:chooseavatar="chooseavatar"
  25. >
  26. <t-icon
  27. wx:if="{{icon || iconProps.name}}"
  28. name="{{icon || iconProps.name}}"
  29. prefix="{{iconProps.prefix}}"
  30. size="{{iconProps.size}}"
  31. color="{{iconProps.color}}"
  32. customStyle="{{iconProps.customStyle}}"
  33. class="{{classPrefix}}__icon {{prefix}}-class-icon"
  34. ></t-icon>
  35. <view wx:if="{{loading}}" class="{{classPrefix}}__loading">
  36. <t-loading
  37. delay="{{loadingProps.delay || 0}}"
  38. duration="{{loadingProps.duration || 800}}"
  39. indicator="{{loadingProps.indicator || true}}"
  40. inheritColor="{{loadingProps.indicator || false}}"
  41. layout="{{loadingProps.layout || 'horizontal'}}"
  42. pause="{{loadingProps.pause || false}}"
  43. progress="{{loadingProps.progress}}"
  44. reverse="{{loadingProps.reverse}}"
  45. size="{{loadingProps.size || '40rpx'}}"
  46. text="{{loadingProps.text }}"
  47. theme="{{loadingProps.theme || 'circular'}}"
  48. loading
  49. t-class="position-center"
  50. t-class-indicator="indicator-blue {{prefix}}-class-loading"
  51. ></t-loading>
  52. </view>
  53. <view class="{{classPrefix}}__content">
  54. <slot name="content" />
  55. <block>{{content}}</block>
  56. <slot />
  57. </view>
  58. </button>