home.vue 969 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <view>
  3. <uni-nav-bar left-icon="back" left-text="返回" right-text="菜单" title="导航栏组件" statusBar="true" fixed></uni-nav-bar>
  4. <view class="content">
  5. <image class="logo" src="/static/logo.png"></image>
  6. <view class="text-area">
  7. <text class="title">{{title}}</text>
  8. </view>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import uniNavBar from '@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue'
  14. export default {
  15. data() {
  16. return {
  17. title: 'Hello'
  18. }
  19. },
  20. components:{uniNavBar},
  21. onLoad() {
  22. },
  23. methods: {
  24. }
  25. }
  26. </script>
  27. <style>
  28. .content {
  29. display: flex;
  30. flex-direction: column;
  31. align-items: center;
  32. justify-content: center;
  33. }
  34. .logo {
  35. height: 200rpx;
  36. width: 200rpx;
  37. margin-top: 200rpx;
  38. margin-left: auto;
  39. margin-right: auto;
  40. margin-bottom: 50rpx;
  41. }
  42. .text-area {
  43. display: flex;
  44. justify-content: center;
  45. }
  46. .title {
  47. font-size: 36rpx;
  48. color: #8f8f94;
  49. }
  50. </style>