a-table 设置
<a-table
:columns="columns"
:data-source="data"
:scroll="{ x: 0, y: 300 }" 控制列表默认最大和最小高度
:showHeader="false" 是否展示表头
:pagination="false"
:loading="iterations_loading"
>
<span slot="name" slot-scope="record"> {{ record }} </span>
<span slot="check" slot-scope="record">
<a-checkbox checked="record"
><span v-if="false">{{ record }}</span></a-checkbox
>
</span>
</a-table>
data() {
return {
columns: [
{
title: "测试人员",
dataIndex: "name",
key: "name",
scopedSlots: { customRender: "name" },
},
{
title: "周报数据确认",
dataIndex: "check",
key: "check",
scopedSlots: { customRender: "check" },
},
],
data: [
{ name: "zhangsan", check: "true" },
{ name: "zhangsan", check: "true" },
{ name: "zhangsan", check: "true" },
{ name: "zhangsan", check: "true" },
{ name: "zhangsan", check: "true" },
{ name: "zhangsan", check: "true" },
],
iterations_loading: false,
};
},