index.wxml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <van-popup
  2. show="{{ show }}"
  3. z-index="{{ zIndex }}"
  4. overlay="{{ overlay }}"
  5. custom-class="van-dialog"
  6. transition="{{ transition }}"
  7. close-on-click-overlay="{{ closeOnClickOverlay }}"
  8. bind:close="onClickOverlay"
  9. >
  10. <view
  11. wx:if="{{ title }}"
  12. class="van-dialog__header {{ message || useSlot ? '' : 'van-dialog--isolated' }}"
  13. >
  14. {{ title }}
  15. </view>
  16. <slot wx:if="{{ useSlot }}" />
  17. <view
  18. wx:elif="{{ message }}"
  19. class="van-dialog__message {{ title ? 'van-dialog__message--has-title' : '' }} {{ messageAlign ? 'van-dialog__message--' + messageAlign : '' }}"
  20. >
  21. <text>{{ message }}</text>
  22. </view>
  23. <view class="van-hairline--top van-dialog__footer">
  24. <van-button
  25. wx:if="{{ showCancelButton }}"
  26. size="large"
  27. loading="{{ loading.cancel }}"
  28. class="van-dialog__button van-hairline--right"
  29. custom-class="van-dialog__cancel"
  30. bind:click="onCancel"
  31. >
  32. {{ cancelButtonText }}
  33. </van-button>
  34. <van-button
  35. wx:if="{{ showConfirmButton }}"
  36. size="large"
  37. class="van-dialog__button"
  38. loading="{{ loading.confirm }}"
  39. custom-class="van-dialog__confirm"
  40. open-type="{{ confirmButtonOpenType }}"
  41. bind:click="onConfirm"
  42. binderror="bindError"
  43. bindcontact="bindContact"
  44. bindopensetting="bindOpenSetting"
  45. bindgetuserinfo="bindGetUserInfo"
  46. bindgetphonenumber="bindGetPhoneNumber"
  47. >
  48. {{ confirmButtonText }}
  49. </van-button>
  50. </view>
  51. </van-popup>