app-order-submit-row.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <template>
  2. <view class="app-order-submit-row"
  3. :class="[
  4. showBorder ? 'border-bottom' : '',
  5. noPadding ? 'no-padding' : '',
  6. ]"
  7. @click="handleClick">
  8. <slot name="header"></slot>
  9. <view class="cross-center container">
  10. <view class="box-grow-1">
  11. <slot></slot>
  12. </view>
  13. <view v-if="showNav" class="box-grow-0">
  14. <image class="arrow-image" src="/static/image/icon/arrow-right.png"></image>
  15. </view>
  16. </view>
  17. <slot name="footer"></slot>
  18. </view>
  19. </template>
  20. <script>
  21. export default {
  22. name: 'app-order-submit-row',
  23. props: {
  24. showNav: {
  25. type: Boolean,
  26. default: true,
  27. },
  28. showBorder: {
  29. type: Boolean,
  30. default: true,
  31. },
  32. noPadding: {
  33. type: Boolean,
  34. default: false,
  35. },
  36. },
  37. methods: {
  38. handleClick(e) {
  39. this.$emit('click', e);
  40. },
  41. }
  42. }
  43. </script>
  44. <style scoped lang="scss">
  45. $xWidth: #{24rpx};
  46. $yWidth: #{24rpx};
  47. .app-order-submit-row {
  48. background: #fff;
  49. .container {
  50. padding: $yWidth $xWidth;
  51. /* #ifndef MP-TOUTIAO */
  52. min-height: #{100rpx};
  53. /* #endif */
  54. /* #ifdef MP-TOUTIAO */
  55. min-height: #{50rpx};
  56. /* #endif */
  57. }
  58. .arrow-image {
  59. width: #{12rpx};
  60. height: #{24rpx};
  61. margin-left: $xWidth;
  62. }
  63. }
  64. .app-order-submit-row.border-bottom {
  65. border-bottom: #{1rpx} solid #e2e2e2;
  66. }
  67. .app-order-submit-row.no-padding {
  68. .container {
  69. padding: 0 0;
  70. }
  71. }
  72. </style>