index.vue 808 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view class="nav-bar">
  3. <view class="go-back">
  4. <u-icon name="arrow-left" color="#fff" size="32" @click="goBack"></u-icon>
  5. </view>
  6. <view class="nav-title">
  7. {{ title }}
  8. </view>
  9. </view>
  10. </template>
  11. <script>
  12. export default {
  13. data() {
  14. return {
  15. goBack(){
  16. uni.navigateBack()
  17. }
  18. };
  19. },
  20. props: {
  21. title: "",
  22. },
  23. };
  24. </script>
  25. <style lang="scss" scoped>
  26. .nav-bar {
  27. width: 100%;
  28. padding: 24rpx 32rpx 20rpx 32rpx;
  29. box-sizing: border-box;
  30. color: rgba(255, 255, 255, 1);
  31. font-family: DM Sans;
  32. font-size: 30rpx;
  33. font-weight: 700;
  34. line-height: 26px;
  35. display: flex;
  36. justify-content: center;
  37. align-items: center;
  38. position: relative;
  39. .go-back{
  40. position: absolute;
  41. top: 24rpx;
  42. left: 32rpx;
  43. }
  44. }
  45. </style>