header.vue 912 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="navgationTop">
  3. <img class="back" @click="(ev) => { BindClick(ev) }" src="../image/fanhui.png" alt="">
  4. <slot name="body">
  5. <view class="defaultBody">
  6. 欢迎使用团蜂快递服务
  7. </view>
  8. </slot>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. };
  16. },
  17. props: {
  18. BindClick: {
  19. type: Function,
  20. default: () => uni.navigateBack()
  21. },
  22. pathUrl: {
  23. type: String,
  24. default: ''
  25. }
  26. }
  27. }
  28. </script>
  29. <style lang="scss">
  30. .navgationTop {
  31. position: fixed;
  32. top: 0;
  33. left: 0;
  34. box-sizing: border-box;
  35. width: 100vw;
  36. height: 88rpx;
  37. padding: 0 34rpx;
  38. display: flex;
  39. align-items: center;
  40. background-color: #327ee4;
  41. z-index: 999;
  42. .back {
  43. width: 40rpx;
  44. height: 50rpx;
  45. }
  46. .defaultBody {
  47. position: absolute;
  48. left: 50%;
  49. transform: translateX(-50%);
  50. font-size: 34rpx;
  51. color: white;
  52. font-weight: 550;
  53. }
  54. }
  55. </style>