index.wxml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <van-popup
  3. show="{{ show }}"
  4. z-index="{{ zIndex }}"
  5. overlay="{{ overlay }}"
  6. transition="{{ transition }}"
  7. custom-class="van-dialog {{ className }}"
  8. custom-style="width: {{ utils.addUnit(width) }};{{ customStyle }}"
  9. overlay-style="{{ overlayStyle }}"
  10. close-on-click-overlay="{{ closeOnClickOverlay }}"
  11. bind:close="onClickOverlay"
  12. >
  13. <view
  14. wx:if="{{ title || useTitleSlot }}"
  15. class="van-dialog__header {{ message || useSlot ? '' : 'van-dialog--isolated' }}"
  16. >
  17. <slot wx:if="{{ useTitleSlot }}" name="title" />
  18. <block wx:elif="{{ title }}">{{ title }}</block>
  19. </view>
  20. <slot wx:if="{{ useSlot }}" />
  21. <view
  22. wx:elif="{{ message }}"
  23. class="van-dialog__message {{ title ? 'van-dialog__message--has-title' : '' }} {{ messageAlign ? 'van-dialog__message--' + messageAlign : '' }}"
  24. >
  25. <text class="van-dialog__message-text">{{ message }}</text>
  26. </view>
  27. <view class="van-hairline--top van-dialog__footer">
  28. <van-button
  29. wx:if="{{ showCancelButton }}"
  30. size="large"
  31. loading="{{ loading.cancel }}"
  32. class="van-dialog__button van-hairline--right"
  33. custom-class="van-dialog__cancel"
  34. custom-style="color: {{ cancelButtonColor }}"
  35. bind:click="onCancel"
  36. >
  37. {{ cancelButtonText }}
  38. </van-button>
  39. <van-button
  40. wx:if="{{ showConfirmButton }}"
  41. size="large"
  42. class="van-dialog__button"
  43. loading="{{ loading.confirm }}"
  44. custom-class="van-dialog__confirm"
  45. custom-style="color: {{ confirmButtonColor }}"
  46. open-type="{{ confirmButtonOpenType }}"
  47. lang="{{ lang }}"
  48. business-id="{{ businessId }}"
  49. session-from="{{ sessionFrom }}"
  50. send-message-title="{{ sendMessageTitle }}"
  51. send-message-path="{{ sendMessagePath }}"
  52. send-message-img="{{ sendMessageImg }}"
  53. show-message-card="{{ showMessageCard }}"
  54. app-parameter="{{ appParameter }}"
  55. bind:click="onConfirm"
  56. bindgetuserinfo="bindGetUserInfo"
  57. bindcontact="bindContact"
  58. bindgetphonenumber="bindGetPhoneNumber"
  59. binderror="bindError"
  60. bindlaunchapp="bindLaunchApp"
  61. bindopensetting="bindOpenSetting"
  62. >
  63. {{ confirmButtonText }}
  64. </van-button>
  65. </view>
  66. </van-popup>