Q3学习计划
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.

127 lines
2.7 KiB

  1. <template>
  2. <view class="address-panel">
  3. <!-- 关闭按钮 -->
  4. <text class="close icon-close" @tap="emit('close')"></text>
  5. <!-- 标题 -->
  6. <view class="title">配送至</view>
  7. <!-- 内容 -->
  8. <view class="content">
  9. <view class="item">
  10. <view class="user">李明 13824686868</view>
  11. <view class="address">北京市顺义区后沙峪地区安平北街6号院</view>
  12. <text class="icon icon-checked"></text>
  13. </view>
  14. <view class="item">
  15. <view class="user">王东 13824686868</view>
  16. <view class="address">北京市顺义区后沙峪地区安平北街6号院</view>
  17. <text class="icon icon-ring"></text>
  18. </view>
  19. <view class="item">
  20. <view class="user">张三 13824686868</view>
  21. <view class="address">北京市朝阳区孙河安平北街6号院</view>
  22. <text class="icon icon-ring"></text>
  23. </view>
  24. </view>
  25. <view class="footer">
  26. <view class="button primary"> 新建地址 </view>
  27. <view v-if="false" class="button primary">确定</view>
  28. </view>
  29. </view>
  30. </template>
  31. <script setup lang="ts">
  32. // 子调父
  33. const emit = defineEmits<{
  34. (event: 'close'): void
  35. }>()
  36. </script>
  37. <style lang="scss">
  38. .address-panel {
  39. padding: 0 30rpx;
  40. border-radius: 10rpx 10rpx 0 0;
  41. position: relative;
  42. background-color: #fff;
  43. }
  44. .title {
  45. line-height: 1;
  46. padding: 40rpx 0;
  47. text-align: center;
  48. font-size: 32rpx;
  49. font-weight: normal;
  50. border-bottom: 1rpx solid #ddd;
  51. color: #444;
  52. }
  53. .close {
  54. position: absolute;
  55. right: 24rpx;
  56. top: 24rpx;
  57. }
  58. .content {
  59. min-height: 300rpx;
  60. max-height: 540rpx;
  61. overflow: auto;
  62. padding: 20rpx;
  63. .item {
  64. padding: 30rpx 50rpx 30rpx 60rpx;
  65. background-size: 40rpx;
  66. background-repeat: no-repeat;
  67. background-position: 0 center;
  68. background-image: url(https://pcapi-xiaotuxian-front-devtest.itheima.net/miniapp/images/locate.png);
  69. position: relative;
  70. }
  71. .icon {
  72. color: #999;
  73. font-size: 40rpx;
  74. transform: translateY(-50%);
  75. position: absolute;
  76. top: 50%;
  77. right: 0;
  78. }
  79. .icon-checked {
  80. color: #27ba9b;
  81. }
  82. .icon-ring {
  83. color: #444;
  84. }
  85. .user {
  86. font-size: 28rpx;
  87. color: #444;
  88. font-weight: 500;
  89. }
  90. .address {
  91. font-size: 26rpx;
  92. color: #666;
  93. }
  94. }
  95. .footer {
  96. display: flex;
  97. justify-content: space-between;
  98. padding: 20rpx 0 40rpx;
  99. font-size: 28rpx;
  100. color: #444;
  101. .button {
  102. flex: 1;
  103. height: 72rpx;
  104. text-align: center;
  105. line-height: 72rpx;
  106. margin: 0 20rpx;
  107. color: #fff;
  108. border-radius: 72rpx;
  109. }
  110. .primary {
  111. color: #fff;
  112. background-color: #27ba9b;
  113. }
  114. .secondary {
  115. background-color: #ffa868;
  116. }
  117. }
  118. </style>