index.axml 1.7 KB

123456789101112131415161718192021
  1. <import-sjs from="./index.axmlloadingColor.sjs" name='loadingColor'>
  2. </import-sjs><import-sjs from='../wxs/utils.sjs' name='utils'>
  3. </import-sjs><view unscope-style=" " style='{{style}}' class='{{className}} {{utils.bem("button", [{block}]).match(/van-button--block/) ? "button-index-block" : "button-index-inlineflex"}}' ref='saveChildRef0'>
  4. <btn id='{{ id }}' data-detail='{{ dataset }}' class="{{customClass}} {{ utils.bem('button', [type, size, { block, round, plain, square, loading, disabled, hairline, unclickable: disabled || loading }]) }} {{ hairline ? 'van-hairline--surround' : '' }}" hover-class='van-button--active {{hoverClass}}' form-type='{{ formType }}' style='{{ baseStyle }} {{ customStyle }}' open-type="{{ disabled ? '' : openType }}" business-id='{{ businessId }}' app-parameter='{{ appParameter }}' aria-label='{{ ariaLabel }}' onGetUserInfo='bindGetUserInfo' onGetPhoneNumber='bindGetPhoneNumber' onOpenSetting='bindOpenSetting' onTap='antmoveAction' data-antmove-tap="{{ !disabled ? 'onClick' : 'noop' }}">
  5. <block a:if='{{ loading }}'>
  6. <van-loading custom-class='{{loadingClass}}' size='{{ loadingSize }}' type='{{ loadingType }}' color='{{ loadingColor(type,color,plain) }}' ref='saveChildRef1'>
  7. </van-loading>
  8. <view a:if='{{ loadingText }}' class='van-button__loading-text'>
  9. {{ loadingText }}
  10. </view>
  11. </block>
  12. <block a:else >
  13. <van-icon a:if='{{ icon }}' size='1.2em' name='{{ icon }}' class-prefix='{{ classPrefix }}' class='van-button__icon' custom-style='line-height: inherit;' ref='saveChildRef2'>
  14. </van-icon>
  15. <view class='van-button__text'>
  16. <slot>
  17. </slot>
  18. </view>
  19. </block>
  20. </btn>
  21. </view>