html部分:
<el-form-item label="发货地址">
<el-cascader
ref="myCascader"
v-model="params.shippingAddress"
:props="cityProps"
:options="options"
clearable
@change="addressChange"
></el-cascader>
</el-form-item>
daa部分:
params: {
logisticsName: "",
chargeType: 1,
distributionType: "", //配送方式
shippingAddress:[],
// distributionTypeName: "",
charges: [
{
weight: "",
price: "",
secondWeight: "",
secondPrice: "",
regions: [],
},
],
},
按钮方法部分:
// 查看详情
async getDetails() {
const res = await logisticsGetById({ logisticsId: this.checkId });
console.log(res.data);
if (res.code === "200") {
let city;
city = res.data.shippingAddressArray.join('/')
console.log(city);
this.params.shippingAddress = city
console.log(this.params.shippingAddress);
this.params = res.data;
}
},
打印部分: