业务交流通
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

tabbar.js 718B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // components/tabbar/tabbar.js
  2. const app = getApp()
  3. Component({
  4. /**
  5. * 组件的属性列表
  6. */
  7. properties: {
  8. currentIndex: {
  9. type: String,
  10. value: '0',
  11. }
  12. },
  13. /**
  14. * 组件的初始数据
  15. */
  16. data: {
  17. list: [
  18. {
  19. text: "对话",
  20. iconPath: "/images/tabbar/tabbar_1.png",
  21. selectedIconPath: "/images/tabbar/tabbar_1.png",
  22. dot: true
  23. },
  24. {
  25. text: "设置",
  26. iconPath: "/images/tabbar/tabbar_2.png",
  27. selectedIconPath: "/images/tabbar/tabbar_2.png",
  28. badge: '99+'
  29. }
  30. ]
  31. },
  32. /**
  33. * 组件的方法列表
  34. */
  35. methods: {
  36. tabChange(e) {
  37. console.log('tab change--aa', e)
  38. }
  39. }
  40. })