记录自己每天学习一个小知识(第一天):
<template v-for="(item,i) in table.columns" #[item.slot]="{ row,index }" :key="item">
{{row.materialName}}
</template>
<script>
const table = reactive({
columns:[
{
slot: "materialCode",
label: "物料编码",
width:180,
isSelection:true,
},
{
slot: "materialName",
label: "物料名称",
width:180,
},
{
slot: "total",
label: "合计",
width:180,
},
{
slot: "10-1",
label: "10-01",
width:180,
},
{
slot: "10-2",
label: "10-02",
width:180,
},
{
slot: "10-3",
label: "10-03",
width: 180
},
{
slot: "operate",
label: "操作",
width: "108px",
fixed: "right"
},
]
)}
</script>