index.vue 859 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view>
  3. <view class="u-page">
  4. </view>
  5. <!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 -->
  6. <u-tabbar v-model="current" :list="list"></u-tabbar>
  7. </view>
  8. </template>
  9. <script>
  10. export default {
  11. data() {
  12. return {
  13. list: [{
  14. iconPath: "home",
  15. selectedIconPath: "home-fill",
  16. text: '首页',
  17. customIcon: false,
  18. pagePath: '/pages/home/index'
  19. },
  20. {
  21. iconPath: "chat",
  22. selectedIconPath: "chat-fill",
  23. text: '消息',
  24. count: 2,
  25. isDot: false,
  26. customIcon: false,
  27. pagePath: '/pages/msg/index'
  28. },
  29. {
  30. iconPath: "account",
  31. selectedIconPath: "account-fill",
  32. text: '我的',
  33. customIcon: false,
  34. pagePath: '/pages/me/index'
  35. },
  36. ],
  37. current: 1
  38. };
  39. }
  40. }
  41. </script>
  42. <style lang="scss">
  43. </style>