index.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <u-tabbar :value="value" :list="tabbar_list" :active-color="activeColor" :border-top="false"></u-tabbar>
  3. </template>
  4. <script>
  5. export default {
  6. model: {
  7. props: 'value'
  8. },
  9. props: {
  10. value: {
  11. type: Number,
  12. default: 0
  13. }
  14. },
  15. computed: {
  16. tabbar_list() {
  17. return [
  18. {
  19. iconPath: 'https://onlineimg.qianniao.vip/tar-home-unsel.png',
  20. selectedIconPath: 'https://onlineimg.qianniao.vip/tar-home-' + this.theme + '.png',
  21. text: '首页',
  22. customIcon: false,
  23. pagePath: '/pages/index/index'
  24. },
  25. {
  26. iconPath: 'https://onlineimg.qianniao.vip/tar-cate-unsel.png',
  27. selectedIconPath: 'https://onlineimg.qianniao.vip/tar-cate-' + this.theme + '.png',
  28. text: '分类',
  29. customIcon: false,
  30. pagePath: '/pages/classification/cate'
  31. },
  32. {
  33. iconPath: 'https://onlineimg.qianniao.vip/tar-car-unsel.png',
  34. selectedIconPath: 'https://onlineimg.qianniao.vip/tar-car-' + this.theme + '.png',
  35. text: '购物车',
  36. customIcon: false,
  37. // 红色角标显示的数字,如果需要移除角标,配置此参数为0即可
  38. count: this.$store.state.cartNum,
  39. pagePath: '/pages/cart/cart'
  40. },
  41. {
  42. iconPath: 'https://onlineimg.qianniao.vip/tar-my-unsel.png',
  43. selectedIconPath: 'https://onlineimg.qianniao.vip/tar-my-' + this.theme + '.png',
  44. text: '我的',
  45. customIcon: false,
  46. pagePath: '/pages/user/user'
  47. }
  48. ];
  49. },
  50. activeColor() {
  51. return this.$store.state.baseSet.themeStyle.color_o || '#FD463E';
  52. // return '#FD463E';
  53. }
  54. }
  55. };
  56. </script>
  57. <style></style>