index.vue 751 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <template>
  2. <view class="navbar-box">
  3. <image src="https://minio.citupro.com/dev/menduner/poster.png" class="navbar-box-logo"></image>
  4. <view class="navbar-box-title">{{ title }}</view>
  5. </view>
  6. </template>
  7. <script setup>
  8. defineProps({
  9. title: {
  10. type: String,
  11. default: '门墩儿'
  12. }
  13. })
  14. </script>
  15. <style scoped lang="scss">
  16. .navbar-box {
  17. height: 80px;
  18. width: 100%;
  19. position: relative;
  20. background: linear-gradient(90deg, #66BB6A 0, #64FFDA 100%);
  21. &-logo {
  22. position: absolute;
  23. top: 50%;
  24. transform: translateY(-50%);
  25. width: 100px;
  26. height: 42px;
  27. margin-left: 10px;
  28. }
  29. &-title {
  30. position: absolute;
  31. top: 50%;
  32. left: 50%;
  33. transform: translate(-30%, 0);
  34. color: #fff;
  35. }
  36. }
  37. </style>