gaoluyang
15 小时以前 e449a5408265e4bd1f6c66f5be28a42efac444ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!--
  收货地址子表的一行
 
  后端 shippingAddress 只存一条(consignee=收货人、contract=联系电话、address=地址),
  所以这个子表在表单里只会有一行,提交时按 mapper 取第一行。
-->
<template>
  <view class="address-card">
    <view class="address-header">
      <text class="address-title">收货地址</text>
    </view>
    <up-divider></up-divider>
 
    <view class="address-body">
      <view class="field-row">
        <text class="field-label">收货人</text>
        <u-input v-model="row.receiver"
                 placeholder="请输入收货人"
                 border="none"
                 inputAlign="right" />
      </view>
 
      <view class="field-row">
        <text class="field-label">联系方式</text>
        <u-input v-model="row.phone"
                 type="number"
                 placeholder="请输入联系方式"
                 border="none"
                 inputAlign="right" />
      </view>
 
      <view class="field-row">
        <text class="field-label">收货地址</text>
        <u-input v-model="row.address"
                 placeholder="请输入收货地址"
                 border="none"
                 inputAlign="right" />
      </view>
    </view>
  </view>
</template>
 
<script setup>
  defineProps({
    row: {
      type: Object,
      required: true,
    },
  });
</script>
 
<style scoped lang="scss">
  .address-card {
    background: #fff;
    border-radius: 12px;
    padding: 0 12px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
 
  .address-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
  }
 
  .address-title {
    font-size: 14px;
    font-weight: 600;
    color: #22324d;
  }
 
  .address-body {
    padding-top: 4px;
  }
 
  .field-row {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-bottom: 1px solid #f5f6fa;
  }
 
  .field-row:last-child {
    border-bottom: none;
  }
 
  .field-label {
    width: 96px;
    flex-shrink: 0;
    font-size: 14px;
    color: #606266;
  }
</style>