orderDetailNewView.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view class="orderDetailNewView">
  3. <view class="page-item" v-show="activeIndex === 0">
  4. <pageOne @handleNextClick="handleNextClick" :orderDetail="detail" />
  5. </view>
  6. <view class="page-item" v-show="activeIndex === 1">
  7. <pageTwo @handleNextClick="handleNextClick" :orderDetail="detail" />
  8. </view>
  9. <view class="page-item" v-show="activeIndex === 2">
  10. <pageThree @handleNextClick="handleNextClick" :detailImages="allFroms.formTwo.detailImages || []"
  11. :orderDetail="detail" />
  12. </view>
  13. <view class="page-item" v-show="activeIndex === 3">
  14. <pageFour @handleNextClick="handleNextClick" :orderDetail="detail" />
  15. </view>
  16. <ul class="page">
  17. <li v-for="(tab, index) in tabs" :key="index" :class="{ 'active': activeIndex === index }"
  18. @click="activeIndex = index">{{ tab }}</li>
  19. </ul>
  20. </view>
  21. </template>
  22. <script>
  23. import pageOne from './pageOne.vue'
  24. import pageTwo from './pageTwo.vue'
  25. import pageThree from './pageThree.vue'
  26. import pageFour from './pageFour.vue'
  27. export default {
  28. props: {
  29. detail: {
  30. type: Object,
  31. default: () => { },
  32. }
  33. },
  34. components: {
  35. pageOne,
  36. pageTwo,
  37. pageThree,
  38. pageFour
  39. },
  40. data() {
  41. return {
  42. activeIndex: 0,
  43. tabs: ['一', '二', '三', '四'],
  44. allFroms: {
  45. formOne: {},
  46. formTwo: {},
  47. formThree: {},
  48. formFour: {},
  49. }
  50. }
  51. },
  52. name: 'OrderDetailNewView',
  53. methods: {
  54. handleNextClick({ nowPage, form }) {
  55. this.activeIndex++
  56. this.allFroms[nowPage] = form
  57. console.log("1111", this.allFroms[nowPage])
  58. }
  59. }
  60. }
  61. </script>
  62. <style scoped>
  63. .orderDetailNewView {
  64. padding: 20rpx;
  65. }
  66. .page {
  67. position: fixed;
  68. right: 20rpx;
  69. top: 40%;
  70. display: flex;
  71. flex-direction: column;
  72. align-items: center;
  73. justify-content: center;
  74. list-style: none;
  75. color: #000;
  76. font-size: 20rpx;
  77. font-weight: 800;
  78. li {
  79. opacity: 0.7;
  80. display: flex;
  81. align-items: center;
  82. justify-content: center;
  83. background-color: #fff;
  84. border-radius: 50%;
  85. width: 70rpx;
  86. height: 70rpx;
  87. line-height: 80rpx;
  88. text-align: center;
  89. margin-bottom: 10rpx;
  90. transition: all 0.3s ease-in-out;
  91. font-weight: 800;
  92. }
  93. li.active {
  94. color: #fff;
  95. opacity: 1;
  96. background-color: rgb(37 99 235 / 1);
  97. }
  98. }
  99. </style>