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,
    };
  },
              
              
              
              

 

posted @ 2024-06-20 01:19  凯宾斯基  阅读(80)  评论(0编辑  收藏  举报