NavBar.vue 863 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <view>
  3. <view class="status_bar"></view>
  4. <view class="navBarBox">
  5. <slot>
  6. <text class="navTitle">缴费</text>
  7. </slot>
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. name:"nav-bar",
  14. }
  15. </script>
  16. <style scoped lang="scss">
  17. .status_bar {
  18. height: var(--status-bar-height);
  19. width: 100%;
  20. background: #1479f7;
  21. }
  22. .navBarBox{
  23. height: 44px;
  24. line-height: 44px;
  25. display: flex;
  26. justify-content: space-between;
  27. align-items: center;
  28. background: #1479f7;
  29. color: #FFFFFF;
  30. font-size: 28rpx;
  31. position: relative;
  32. }
  33. .navTitle{
  34. width: 100%;
  35. display: block;
  36. text-align: center;
  37. font-size: 28rpx;
  38. }
  39. .backBox{
  40. position: absolute;
  41. top: 50%;
  42. margin-top: -22rpx;
  43. left: 0;
  44. width: 40rpx;
  45. padding: 0 30rpx;
  46. height: 44rpx;
  47. }
  48. .backBtn{
  49. display: block;
  50. width: 18rpx;
  51. height: 30rpx;
  52. }
  53. </style>