海鲜小程序

index.wxml 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <wxs src="../wxs/utils.wxs" module="utils" />
  2. <van-popup
  3. show="{{ show }}"
  4. position="bottom"
  5. round="{{ round }}"
  6. z-index="{{ zIndex }}"
  7. overlay="{{ overlay }}"
  8. custom-class="van-action-sheet"
  9. safe-area-inset-bottom="{{ safeAreaInsetBottom }}"
  10. close-on-click-overlay="{{ closeOnClickOverlay }}"
  11. bind:close="onClickOverlay"
  12. >
  13. <view wx:if="{{ title }}" class="van-hairline--bottom van-action-sheet__header">
  14. {{ title }}
  15. <van-icon
  16. name="close"
  17. custom-class="van-action-sheet__close"
  18. bind:click="onClose"
  19. />
  20. </view>
  21. <view wx:if="{{ description }}" class="van-action-sheet__description">
  22. {{ description }}
  23. </view>
  24. <view wx:if="{{ actions && actions.length }}">
  25. <!-- button外包一层view,防止actions动态变化,导致渲染时button被打散 -->
  26. <button
  27. wx:for="{{ actions }}"
  28. wx:key="index"
  29. open-type="{{ item.openType }}"
  30. style="{{ item.color ? 'color: ' + item.color : '' }}"
  31. class="{{ utils.bem('action-sheet__item', { disabled: item.disabled || item.loading }) }} van-hairline--top {{ item.className || '' }}"
  32. hover-class="van-action-sheet__item--hover"
  33. data-index="{{ index }}"
  34. bind:tap="onSelect"
  35. bindgetuserinfo="bindGetUserInfo"
  36. bindcontact="bindContact"
  37. bindgetphonenumber="bindGetPhoneNumber"
  38. binderror="bindError"
  39. bindlaunchapp="bindLaunchApp"
  40. bindopensetting="bindOpenSetting"
  41. lang="{{ lang }}"
  42. session-from="{{ sessionFrom }}"
  43. send-message-title="{{ sendMessageTitle }}"
  44. send-message-path="{{ sendMessagePath }}"
  45. send-message-img="{{ sendMessageImg }}"
  46. show-message-card="{{ showMessageCard }}"
  47. app-parameter="{{ appParameter }}"
  48. >
  49. <block wx:if="{{ !item.loading }}">
  50. {{ item.name }}
  51. <text wx:if="{{ item.subname }}" class="van-action-sheet__subname" >{{ item.subname }}</text>
  52. </block>
  53. <van-loading wx:else custom-class="van-action-sheet__loading" size="20px" />
  54. </button>
  55. </view>
  56. <slot />
  57. <view
  58. wx:if="{{ cancelText }}"
  59. class="van-action-sheet__cancel"
  60. hover-class="van-action-sheet__cancel--hover"
  61. hover-stay-time="70"
  62. bind:tap="onCancel"
  63. >
  64. {{ cancelText }}
  65. </view>
  66. </van-popup>