index.vue 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <template>
  2. <view>
  3. <u-tabbar :value="name" :fixed="true" :placeholder="false" activeColor="#d81e06" :safeAreaInsetBottom="false"
  4. :activeColor="'#F85252'" :inactiveColor="'#BFBFBF'">
  5. <u-tabbar-item text="首页" name="Index" @click="goPage('Index')">
  6. <image class="u-page__item__slot-icon" slot="active-icon" src="@/static/tabbar/index_a.png"
  7. style="width: 50rpx; height: 50rpx;">
  8. </image>
  9. <image class="u-page__item__slot-icon" slot="inactive-icon" src="@/static/tabbar/index.png"
  10. style="width: 50rpx; height: 50rpx;">
  11. </image>
  12. </u-tabbar-item>
  13. <u-tabbar-item text="分类" name="Cat" @click="goPage('Cat')">
  14. <image class="u-page__item__slot-icon" slot="active-icon" src="@/static/tabbar/cat_a.png"
  15. style="width: 50rpx; height: 50rpx;">
  16. </image>
  17. <image class="u-page__item__slot-icon" slot="inactive-icon" src="@/static/tabbar/cat.png"
  18. style="width: 50rpx; height: 50rpx;">
  19. </image>
  20. </u-tabbar-item>
  21. <u-tabbar-item text="售后" name="Ser" @click="goPage('Ser')">
  22. <image class="u-page__item__slot-icon" slot="active-icon" src="@/static/tabbar/service_a.png"
  23. style="width: 50rpx; height: 50rpx;"></image>
  24. <image class="u-page__item__slot-icon" slot="inactive-icon" src="@/static/tabbar/service.png"
  25. style="width: 50rpx; height: 50rpx;">
  26. </image>
  27. </u-tabbar-item>
  28. <!-- <u-tabbar-item text="我的" name="Mine" @click="goPage('Mine')">
  29. <image class="u-page__item__slot-icon" slot="active-icon"
  30. :src="'/static/active-icon/wode@2x.png' | getStaticUrl " style="width: 50rpx; height: 50rpx;">
  31. </image>
  32. <image class="u-page__item__slot-icon" slot="inactive-icon"
  33. :src="'/static/icon/wode@2x.png' | getStaticUrl" style="width: 50rpx; height: 50rpx;">
  34. </image>
  35. </u-tabbar-item> -->
  36. <u-tabbar-item text="我的" name="My" @click="goPage('My')">
  37. <image class="u-page__item__slot-icon" slot="active-icon" src="@/static/tabbar/my_a.png"
  38. style="width: 50rpx; height: 50rpx;">
  39. </image>
  40. <image class="u-page__item__slot-icon" slot="inactive-icon" src="@/static/tabbar/my.png"
  41. style="width: 50rpx; height: 50rpx;">
  42. </image>
  43. </u-tabbar-item>
  44. </u-tabbar>
  45. </view>
  46. </template>
  47. <script>
  48. export default {
  49. props: {
  50. name: String
  51. },
  52. methods: {
  53. goPage(name) {
  54. this.$emit('changtab', name)
  55. }
  56. }
  57. }
  58. </script>
  59. <style lang="scss" scoped>
  60. @import "./index.scss";
  61. </style>