my.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <view>
  3. <u-tabbar
  4. :value="tabbarCheck"
  5. @change="tabbarChange"
  6. activeColor="#5F7DE9"
  7. >
  8. <u-tabbar-item name="team" text="加入">
  9. <image
  10. class="u-page__item__slot-icon"
  11. slot="active-icon"
  12. src="@/static/image/nav-icon/antOutline-team Copy.png"
  13. ></image>
  14. <image
  15. class="u-page__item__slot-icon"
  16. slot="inactive-icon"
  17. src="@/static/image/nav-icon/antOutline-team.png"
  18. ></image>
  19. </u-tabbar-item>
  20. <u-tabbar-item name="notification" text="通知">
  21. <image
  22. class="u-page__item__slot-icon"
  23. slot="active-icon"
  24. src="@/static/image/nav-icon/md-notifications_none Copy.png"
  25. ></image>
  26. <image
  27. class="u-page__item__slot-icon"
  28. slot="inactive-icon"
  29. src="@/static/image/nav-icon/md-notifications_none.png"
  30. ></image>
  31. </u-tabbar-item>
  32. <u-tabbar-item name="user" text="我的">
  33. <image
  34. class="u-page__item__slot-icon"
  35. slot="active-icon"
  36. src="@/static/image/nav-icon/antOutline-user1 Copy.png"
  37. ></image>
  38. <image
  39. class="u-page__item__slot-icon"
  40. slot="inactive-icon"
  41. src="@/static/image/nav-icon/antOutline-user1.png"
  42. ></image>
  43. </u-tabbar-item>
  44. </u-tabbar>
  45. </view>
  46. </template>
  47. <script>
  48. export default {
  49. data() {
  50. return {
  51. tabbarCheck:'user',
  52. }
  53. },
  54. methods: {
  55. tabbarChange(e){
  56. console.log(e)
  57. if(e=='team'){
  58. uni.navigateTo({
  59. url:'/pageA/notice/index'
  60. })
  61. }else if(e=='user'){
  62. uni.navigateTo({
  63. url:'/pageA/my/my'
  64. })
  65. }
  66. // name => tabbarCheck = name
  67. },
  68. }
  69. }
  70. </script>
  71. <style>
  72. </style>