use-pop.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <template>
  2. <view>
  3. <u-popup :show="meunShow" @close="closeClick" mode="left" zIndex="999999" bgColor="#F6F8FA">
  4. <view class="meun-pop">
  5. <view class="use-cont">
  6. <u-avatar :src="userInfo.avatar" size="44"></u-avatar>
  7. <view class="use-cont-name">{{userInfo.nickName}}</view>
  8. <image class="edit-img" src="@/static/image/home/edit-icon.png" mode=""></image>
  9. </view>
  10. <view class="use-msg">
  11. <view class="use-msg-line">
  12. <image class="label-icon" src="@/static/image/home/phone-icon.png" mode=""></image>
  13. <view class="use-msg-line-cont">
  14. <view>手机号</view>
  15. <view class="line-value">199188123456</view>
  16. </view>
  17. </view>
  18. <view class="use-msg-line">
  19. <image class="label-icon" src="@/static/image/home/role-icon.png" mode=""></image>
  20. <view class="use-msg-line-cont">
  21. <view>角色</view>
  22. <view class="line-value">
  23. <view>仓库管理员</view>
  24. <u-icon name="arrow-right" color="#7E838D"></u-icon>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <button class="toLoginBtn">
  30. 退出登录
  31. </button>
  32. </view>
  33. </u-popup>
  34. </view>
  35. </template>
  36. <script>
  37. export default{
  38. props:{
  39. userInfo:{
  40. type:Object,
  41. default:()=>{}
  42. },
  43. value:{
  44. type:Boolean,
  45. default:false
  46. }
  47. },
  48. watch:{
  49. value(val) {
  50. this.meunShow = val
  51. }
  52. },
  53. data() {
  54. return {
  55. meunShow:false
  56. }
  57. },
  58. methods:{
  59. closeClick() {
  60. this.meunShow = false
  61. this.$emit('close')
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="scss" scoped>
  67. .meun-pop {
  68. padding: 0 32rpx;
  69. padding-top: calc(74rpx + var(--status-bar-height));
  70. width: 80vw;
  71. .use-cont {
  72. display: flex;
  73. align-items: center;
  74. &-name {
  75. color: #0F1828;
  76. font-family: "PingFang SC";
  77. font-size: 32rpx;
  78. font-weight: bold;
  79. margin-left: 20rpx;
  80. margin-right: 8rpx;
  81. }
  82. .edit-img {
  83. width: 32rpx;
  84. height: 32rpx;
  85. }
  86. }
  87. .use-msg {
  88. margin-top: 32rpx;
  89. border-radius: 16rpx;
  90. background: #FFF;
  91. box-shadow: 0px 4rpx 16rpx 0px rgba(207, 223, 232, 0.12);
  92. padding: 0 32rpx;
  93. &-line {
  94. display: flex;
  95. align-items: center;
  96. .label-icon {
  97. width: 48rpx;
  98. height: 48rpx;
  99. }
  100. &-cont {
  101. display: flex;
  102. align-items: center;
  103. justify-content: space-between;
  104. height: 100rpx;
  105. border-bottom: 1px solid rgba(191, 200, 219, 0.50);
  106. margin-left: 24rpx;
  107. flex: 1;
  108. color: #0F1828;
  109. font-family: "PingFang SC";
  110. font-size: 28rpx;
  111. font-weight: 400;
  112. .line-value {
  113. display: flex;
  114. align-items: center;
  115. color: #666;
  116. .u-icon {
  117. margin-left: 24rpx;
  118. }
  119. }
  120. }
  121. }
  122. }
  123. .toLoginBtn {
  124. height: 88rpx;
  125. background: linear-gradient(90deg, #1A65FF 0%, #4287FF 100%);
  126. border-radius: 16rpx;
  127. color: #fff;
  128. margin-bottom: 32rpx;
  129. margin-top: 30rpx;
  130. }
  131. }
  132. </style>