tabbar.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <template>
  2. <view>
  3. <workTable ref="workTableRef" v-if="pageCurrent=='workTable'"></workTable>
  4. <me v-if="pageCurrent=='me'"></me>
  5. <me v-if="pageCurrent=='order'"></me>
  6. <view class="box">
  7. <view class="cu-bar tabbar bg-white shadow foot">
  8. <view class="action" @click="navChange" data-cur="order">
  9. <view class='cuIcon-cu-image'>
  10. <image v-if="pageCurrent=='order'" src="../../static/tabbar/order_cur.png"></image>
  11. <image v-if="pageCurrent != 'order'" src="../../static/tabbar/order.png"></image>
  12. </view>
  13. <view :class="pageCurrent=='order'?'color_main':'text-gray'">配送列表</view>
  14. </view>
  15. <view class="action" @click="navChange" data-cur="workTable">
  16. <view class='cuIcon-cu-image'>
  17. <image v-if="pageCurrent=='workTable'" src="../../static/tabbar/workTable_cur.png"></image>
  18. <image v-if="pageCurrent != 'workTable'" src="../../static/tabbar/workTable.png"></image>
  19. </view>
  20. <view :class="pageCurrent=='workTable'?'color_main':'text-gray'">工作台</view>
  21. </view>
  22. <!-- <view @click="navChange" class="action text-gray add-action" data-cur="workTable">
  23. <image class="logo_btn" mode="widthFix" src="../../static/logo.png"></image>
  24. <view :class="pageCurrent=='workTable'?'color_main':'text-gray'">工作台</view>
  25. </view> -->
  26. <view class="action" @click="navChange" data-cur="me">
  27. <view class='cuIcon-cu-image'>
  28. <view class="cu-tag badge">
  29. <!-- 红点 -->
  30. </view>
  31. <image v-if="pageCurrent=='me'" src="../../static/tabbar/me_cur.png"></image>
  32. <image v-if="pageCurrent != 'me'" src="../../static/tabbar/me.png"></image>
  33. </view>
  34. <view :class="pageCurrent=='me'?'color_main':'text-gray'">个人中心</view>
  35. </view>
  36. </view>
  37. </view>
  38. </view>
  39. </template>
  40. <script>
  41. import order from "./order.vue"; //配送列表
  42. import workTable from "./workTable.vue"; //工作台
  43. import me from "./me.vue"; //个人中心
  44. export default {
  45. components: {
  46. order,
  47. workTable,
  48. me
  49. },
  50. data() {
  51. return {
  52. pageCurrent: 'workTable'
  53. }
  54. },
  55. methods: {
  56. navChange: function(e) {
  57. this.pageCurrent = e.currentTarget.dataset.cur;
  58. }
  59. },
  60. }
  61. </script>
  62. <style>
  63. .box {
  64. margin: 20upx 0;
  65. }
  66. .box view.cu-bar {
  67. margin-top: 20upx;
  68. }
  69. .logo_btn{
  70. width: 38*2rpx;
  71. height: 38*2rpx;
  72. position: absolute;
  73. z-index: 2;
  74. border: #09BB07;
  75. border-radius: 50%;
  76. top: -50rpx;
  77. left: 0rpx;
  78. right: 0;
  79. margin: auto;
  80. padding: 0;
  81. }
  82. .cu-bar.tabbar .action.add-action {
  83. padding-top: 56rpx !important;
  84. }
  85. </style>