index.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { appConfig } from "../../config/index"
  2. Component({
  3. options: {
  4. multipleSlots: true, // 在组件定义时的选项中启用多slot支持
  5. },
  6. properties: {
  7. tabs: {
  8. type: Array,
  9. value: [{
  10. icon: appConfig.imgUrl+'tabbar-home',
  11. aicon: appConfig.imgUrl+'tabbar-home-active',
  12. text: '首页',
  13. url: '/pages/home/index'
  14. },
  15. {
  16. icon: appConfig.imgUrl+'tabbar-trade',
  17. aicon: appConfig.imgUrl+'tabbar-trade-active',
  18. text: '挂牌大厅',
  19. url: '/pages/trade/index'
  20. },
  21. {
  22. icon: appConfig.imgUrl+'tabbar-cycle-active',
  23. aicon: appConfig.imgUrl+'tabbar-cycle-active',
  24. text: '钻石圈',
  25. url: '/pages/circle/index'
  26. },
  27. {
  28. icon: appConfig.imgUrl+'tabbar-mine',
  29. aicon: appConfig.imgUrl+'tabbar-mine-active',
  30. text: '我的',
  31. url: '/pages/mine/index'
  32. }],
  33. },
  34. fixed: {
  35. type: Boolean,
  36. value: false,
  37. },
  38. },
  39. data: {
  40. active:0,
  41. },
  42. methods: {
  43. // 切换标签
  44. changeTab(e: any) {
  45. console.log(e)
  46. }
  47. }
  48. })