index.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <u-tabbar :value="value" :list="tabbar_list" active-color="#4076D6" inactive-color="#B8C0C8" :border-top="false"></u-tabbar>
  3. </template>
  4. <script>
  5. import indexIcon from '../../static/Tar_bar_slices/index.png'
  6. import indexIconFill from '../../static/Tar_bar_slices/index-fill.png'
  7. import orderIcon from '../../static/Tar_bar_slices/order.png'
  8. import orderIconFill from '../../static/Tar_bar_slices/order-fill.png'
  9. import goodsIcon from '../../static/Tar_bar_slices/goods.png'
  10. import goodsIconFill from '../../static/Tar_bar_slices/goods-fill.png'
  11. import userIcon from '../../static/Tar_bar_slices/user.png'
  12. import userIconFill from '../../static/Tar_bar_slices/user-fill.png'
  13. import myIcon from '../../static/Tar_bar_slices/my.png'
  14. import myIconFill from '../../static/Tar_bar_slices/my-fill.png'
  15. export default {
  16. model: {
  17. props: 'value'
  18. },
  19. props: {
  20. value: {
  21. type: Number,
  22. default: 0
  23. }
  24. },
  25. computed: {
  26. tabbar_list() {
  27. return [
  28. {
  29. iconPath: indexIcon,
  30. selectedIconPath: indexIconFill,
  31. text: '工作台',
  32. customIcon: false,
  33. pagePath: '/pages/index/index'
  34. },
  35. {
  36. iconPath: orderIcon,
  37. selectedIconPath: orderIconFill,
  38. text: '订单',
  39. customIcon: false,
  40. pagePath: '/pages/order/index'
  41. },
  42. {
  43. iconPath: goodsIcon,
  44. selectedIconPath: goodsIconFill,
  45. text: '商品',
  46. customIcon: false,
  47. pagePath: '/pages/goods/index'
  48. },
  49. {
  50. iconPath: userIcon,
  51. selectedIconPath: userIconFill,
  52. text: '客户',
  53. customIcon: false,
  54. pagePath: '/pages/customer/CustomerList'
  55. },
  56. {
  57. iconPath: myIcon,
  58. selectedIconPath: myIconFill,
  59. text: '我的',
  60. customIcon: false,
  61. pagePath: '/pages/user/index'
  62. }
  63. ];
  64. }
  65. }
  66. };
  67. </script>
  68. <style>
  69. .u-tabbar__content__item__text .u-line-1{
  70. font-size: 20rpx !important;
  71. }
  72. </style>