2021-7-23 转战表格逻辑

本文探讨了从ElementUI转向AntV表格时遇到的逻辑差异,特别是AntV表格中通过columnConfig设置每列的操作,并详细讲解了如何处理子列表展开的逻辑。在请求数据后,将子数据传递给列的children属性,通过设置展开图标列的特殊标识来解决其始终显示的问题。
摘要由CSDN通过智能技术生成

83

其实忘了是什么时候,但是确实是有一段时间在看antv的表格,今天就只写细节逻辑,换一天写勾选的逻辑。

<template>
  <div style="max-height:600px;overflow-y:auto">
    <a-table
      class="ant-table-striped"
      :rowClassName="
        (record, index) => (record.isChild ? 'table-striped' : null)
      "
      :columns="columns"
      :data-source="list"
      rowKey="id"
      v-custom-loading="LoadingData"
      :pagination="false"
      :row-selection="rowSelection"
      @expand="getDetail"
      :expandedRowKeys="expandedRowKeys"
      :expandIconColumnIndex="-1"
    >
      <template #createTime="{ record }">
        {
   {
    timeFormatter(record.last_time) }}
      </template>
      <template #type="{ record }"> {
   {
    record.type_name }}模型 </template>
      <template #last_transform_status="{ record }">
        {
   {
    Status[record.last_transform_status] }}
      </template>
      <template #operation1="{ record }">
        <a-button
          class="link-btn-in-table"
          type="link"
          @click="getDetail(record)"
          v-if="!record.isChild"
          >选择模型版本<up-outlined
            v-if=
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值