index.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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: this.$store.state.baseurl + '/img/user/' + 'home.png',
  20. // selectedIconPath: 'https://onlineimg.qianniao.vip/tar-home-' + this.theme + '.png',
  21. selectedIconPath: this.$store.state.baseurl + '/img/user/' + 'home-action.png',
  22. text: '首页',
  23. customIcon: false,
  24. pagePath: '/pages/index/index'
  25. },
  26. {
  27. iconPath: this.$store.state.baseurl + '/img/user/' + 'cate.png',
  28. selectedIconPath: this.$store.state.baseurl + '/img/user/' + 'cate-action.png',
  29. text: '分类',
  30. customIcon: false,
  31. pagePath: '/pages/classification/cate'
  32. },
  33. {
  34. iconPath: this.$store.state.baseurl + '/img/user/' + 'cart.png',
  35. selectedIconPath: this.$store.state.baseurl + '/img/user/' + 'cart-action.png',
  36. text: '购物车',
  37. customIcon: false,
  38. // 红色角标显示的数字,如果需要移除角标,配置此参数为0即可
  39. count: this.$store.state.cartNum,
  40. pagePath: '/pages/cart/cart'
  41. },
  42. {
  43. iconPath: this.$store.state.baseurl + '/img/user/' + 'user.png',
  44. selectedIconPath: this.$store.state.baseurl + '/img/user/' + 'user-action.png',
  45. text: '我的',
  46. customIcon: false,
  47. pagePath: '/pages/user/user'
  48. }
  49. ];
  50. },
  51. activeColor() {
  52. return this.$store.state.baseSet.themeStyle.color_o || '#FD463E';
  53. // return '#FD463E';
  54. }
  55. }
  56. };
  57. </script>
  58. <style></style>