记录下
vue el-table
<el-table-column
label="类型"
prop="type"
width="80px"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
{
{map[scope.row.type] }}
</template>
</el-table-column>
return {
map:{},//定义map
}
//类型下拉框
getDDLTypeList() {
this.axios.post("SupplierType/GetDDLSupplierType").then((res) => {
this.typeDownList = res.data.data;
this.supplierForm.Type = this.typeDownList[0].value;
let tempData = res.data.data;
var mymap = new Map();
for(let key in tempData)
{
mymap[tempData[key].value] =tempData[key].label;
}
this.map = mymap;
});
},
{
"code":