在要动态改动表头的表头中给label绑定一个数据
<el-table-column
prop="sig_offer"
:label="paymentType"
width="120"
>
通过获取后台请求到的数据赋值到paymentType中
labelValue() {
let _this = this;
if (_this.sellAllData[0].unit === "KG") {
_this.paymentType = "数量(KG)";
} else {
_this.paymentType = "数量(米)";
}
},
// 接口请求——客户表
sellData(order) {
let _this = this;
let _sendData = {
op: "sellData",
order: order,
};
Action.Ajax(
"cloud/oms/report/handler/OrderDetails",
_sendData,
(data) => {
showLoading();
if (data.code == 200) {
_this.sellAllData = data.rows;
console.log(_this.sellAllData[0].unit);
_this.labelValue();
} else {
console.log("请求失败");
}
}
);
},