mine-info.vue 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <view class="mine-info_content">
  3. <view class="bg">
  4. <image class="image" src="../../static/imgs/public/img_top_bg_1.png" mode="aspectFill"></image>
  5. </view>
  6. <view class="container">
  7. <view class="container__avatar">
  8. <image class="image" :src="UserData().getData().avatar_url" mode=""></image>
  9. </view>
  10. <view class="container__name">
  11. {{UserData().getData().user_name}}
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script setup lang="ts">
  17. import { UserData } from '../../stores/userDataManager';
  18. </script>
  19. <style lang="scss">
  20. .mine-info_content{
  21. display: flex;
  22. flex-direction: column;
  23. justify-content: center;
  24. .bg{
  25. position: relative;
  26. flex-shrink: 0;
  27. width: 100%;
  28. height: 300rpx;
  29. .image{
  30. width: 100%;
  31. height: 100%;
  32. }
  33. }
  34. .container{
  35. position: absolute;
  36. display: flex;
  37. flex-direction: row;
  38. margin-left: 40rpx;
  39. align-items: center;
  40. &__avatar{
  41. flex-shrink: 0;
  42. width: 150rpx;
  43. height: 150rpx;
  44. .image {
  45. width: 100%;
  46. height: 100%;
  47. border-radius: 50%;
  48. }
  49. }
  50. &__name{
  51. margin-left: 50rpx;
  52. font-size: 20px;
  53. }
  54. }
  55. }
  56. </style>