Tabbar.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template >
  2. <view>
  3. <u-tabbar v-model="myCurrent" :list="tabbarList"
  4. :active-color="selectedColor" :inactive-color="color" ></u-tabbar>
  5. </view>
  6. </template>
  7. <script>
  8. var img1=require('@/assets/tab/home-3-line.png')
  9. var img2=require('@/assets/tab/home-3-fill.png')
  10. var img3=require('@/assets/tab/todo-line.png')
  11. var img4=require('@/assets/tab/todo-fill.png')
  12. var img5=require('@/assets/tab/add-circle-line.png')
  13. var img6=require('@/assets/tab/add-circle-fill.png')
  14. var img7=require('@/assets/tab/user-search-line.png')
  15. var img8=require('@/assets/tab/user-search-fill.png')
  16. var img9=require('@/assets/tab/user-4-line.png')
  17. var img10=require('@/assets/tab/user-4-fill.png')
  18. export default {
  19. name:"tabbarJob",
  20. props:{
  21. current: 0,
  22. elderStatus: false
  23. },
  24. data() {
  25. return {
  26. color:"#817F99",
  27. selectedColor:"#4696f6",
  28. tabbarList:[
  29. {
  30. "text":"首页",
  31. "pagePath":"/pages/main/index/index",
  32. "iconPath":img1,
  33. "selectedIconPath": img2
  34. },
  35. {
  36. "text":"找雇主",
  37. "pagePath":"/pages/tab/jobInformation/jobInformation",
  38. "iconPath":img3,
  39. "selectedIconPath": img4
  40. },
  41. {
  42. "text":"发布",
  43. "pagePath":"/pages/tab/issue/issue",
  44. "iconPath":img5,
  45. "selectedIconPath":img6
  46. },
  47. {
  48. "text":"找零工",
  49. "pagePath":"/pages/tab/choreInformation/choreInformation",
  50. "iconPath":img7,
  51. "selectedIconPath": img8
  52. },
  53. {
  54. "text":"我的",
  55. "pagePath":"/pages/tab/mine/mine",
  56. "iconPath":img9,
  57. "selectedIconPath": img10
  58. }
  59. ],
  60. oldindex:this.current,
  61. myCurrent:this.current,
  62. };
  63. },methods:{
  64. setcount(c){
  65. //this.myCurrent=c
  66. },
  67. beforeSwitch(index){
  68. },
  69. },
  70. mounted(){
  71. },destroyed(){
  72. }
  73. }
  74. </script>
  75. <style>
  76. </style>