orderDetailNewView.vue 2.4 KB

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