普兆健康管家前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.6 KiB

  1. <template>
  2. <view>
  3. <template v-if="data">
  4. <view class="flex user">
  5. <view>{{ data.name }}</view>
  6. <view>{{ data.phone }}</view>
  7. <view class="tag" v-if="data.default">默认</view>
  8. </view>
  9. <view class="flex address">
  10. <image v-if="showIcon" class="icon" src="@/pages_order/static/address/icon-address.png" mode="scaleToFill"></image>
  11. <view>{{ `${data.area.join('')}${data.address}` }}</view>
  12. </view>
  13. </template>
  14. <template v-else>
  15. <view>请选择地址</view>
  16. </template>
  17. </view>
  18. </template>
  19. <script>
  20. export default {
  21. props: {
  22. data: {
  23. type: Object,
  24. default() {
  25. return null
  26. }
  27. },
  28. showIcon: {
  29. type: Boolean,
  30. default: false,
  31. }
  32. },
  33. }
  34. </script>
  35. <style scoped lang="scss">
  36. .user {
  37. justify-content: flex-start;
  38. column-gap: 24rpx;
  39. font-family: PingFang SC;
  40. font-weight: 400;
  41. font-size: 32rpx;
  42. line-height: 1.4;
  43. color: #181818;
  44. .tag {
  45. padding: 2rpx 14rpx;
  46. font-family: PingFang SC;
  47. font-weight: 400;
  48. font-size: 24rpx;
  49. line-height: 1.4;
  50. color: #7451DE;
  51. background: #EFEAFF;
  52. border: 2rpx solid #7451DE;
  53. border-radius: 8rpx;
  54. }
  55. }
  56. .address {
  57. margin-top: 16rpx;
  58. align-items: flex-start;
  59. justify-content: flex-start;
  60. font-family: PingFang SC;
  61. font-weight: 400;
  62. font-size: 28rpx;
  63. line-height: 1.4;
  64. color: #9B9B9B;
  65. .icon {
  66. margin: 3px 8rpx 0 0;
  67. width: 32rpx;
  68. height: 32rpx;
  69. }
  70. }
  71. </style>