index.vue 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <view>
  3. <view class="status_bar">
  4. <!-- 这里是状态栏 -->
  5. </view>
  6. <view> 状态栏下的文字 </view>
  7. <view class="u-page">
  8. </view>
  9. <!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 -->
  10. <u-tabbar v-model="current" :list="list"></u-tabbar>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. list: [{
  18. iconPath: "home",
  19. selectedIconPath: "home-fill",
  20. text: '首页',
  21. customIcon: false,
  22. pagePath: '/pages/home/index'
  23. },
  24. {
  25. iconPath: "chat",
  26. selectedIconPath: "chat-fill",
  27. text: '消息',
  28. count: 2,
  29. isDot: false,
  30. customIcon: false,
  31. pagePath: '/pages/msg/index'
  32. },
  33. {
  34. iconPath: "account",
  35. selectedIconPath: "account-fill",
  36. text: '我的',
  37. customIcon: false,
  38. pagePath: '/pages/me/index'
  39. },
  40. ],
  41. current: 2
  42. };
  43. }
  44. }
  45. </script>
  46. <style lang="scss" scoped>
  47. .status_bar {
  48. height: var(--status-bar-height);
  49. width: 100%;
  50. background-color:#0095FF;
  51. }
  52. </style>