index.vue 846 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view class="nav-bar">
  3. <view class="go-back">
  4. <u-icon name="arrow-left" :color="color" size="32" @click="goBack"></u-icon>
  5. </view>
  6. <view class="nav-title" :style="{color:color}">
  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. color:''
  23. },
  24. };
  25. </script>
  26. <style lang="scss" scoped>
  27. .nav-bar {
  28. width: 100%;
  29. padding: 24rpx 32rpx 20rpx 32rpx;
  30. box-sizing: border-box;
  31. color: rgba(255, 255, 255, 1);
  32. font-family: DM Sans;
  33. font-size: 30rpx;
  34. font-weight: 700;
  35. line-height: 26px;
  36. display: flex;
  37. justify-content: center;
  38. align-items: center;
  39. position: relative;
  40. .go-back{
  41. position: absolute;
  42. top: 24rpx;
  43. left: 32rpx;
  44. }
  45. }
  46. </style>