猫妈狗爸伴宠师小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.6 KiB

  1. <template>
  2. <view>
  3. <view class="header-buts flex flex-center">
  4. <view class="flex buts-box">
  5. <view class="buts" :class="{'buts-active':activeIndex===1}" @click="activeIndex=1">总订单</view>
  6. <view class="buts" :class="{'buts-active':activeIndex===2}" @click="activeIndex=2">日订单</view>
  7. </view>
  8. </view>
  9. <up-sticky bgColor="#fff">
  10. <view class="container-tabs">
  11. <up-tabs :list="list" lineWidth="68rpx"
  12. :activeStyle="{
  13. color: '#FFFFFF',
  14. fontWeight: 'bold',
  15. transform: 'scale(1.05)'
  16. }"
  17. :inactiveStyle="{
  18. color: '#FFFFFF',
  19. transform: 'scale(1)'
  20. }"
  21. :itemStyle="{height:'88rpx',padding:'0 52rpx'}"
  22. lineColor="#FFFFFF"></up-tabs>
  23. </view>
  24. </up-sticky>
  25. <view class="container">
  26. <systemOrder v-if="current===0"/>
  27. <personOrder v-if="current===1"/>
  28. <lossOrder v-if="current===2"/>
  29. </view>
  30. </view>
  31. </template>
  32. <script setup>
  33. import {reactive, ref} from "vue";
  34. import systemOrder from "./components/systemOrder.vue";
  35. import personOrder from "./components/personOrder.vue";
  36. import lossOrder from "./components/lossOrder.vue";
  37. const current = ref(0)
  38. const activeIndex = ref(1)
  39. const list = reactive([
  40. {
  41. name: '系统派单',
  42. badge: {
  43. value: 5,
  44. }
  45. },
  46. {
  47. name: '个人订单',
  48. badge: {
  49. value: 5,
  50. }
  51. },
  52. {
  53. name: '流失订单',
  54. badge: {
  55. value: 5,
  56. }
  57. },
  58. ])
  59. </script>
  60. <style scoped lang="scss">
  61. @import "index.scss";
  62. </style>