index.vue 1.1 KB

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