<!--
|
收货地址子表的一行
|
|
后端 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>
|