ant design pro 自定义展开图标

<a-table
  ref="tables5"
  rowKey="key"
  :columns="transactionDetailColumns"
  :data-source="transactionDetailList"
  :pagination="transactionDetailPagination" :loading="confirmLoading" @change="handleTransactionDetailTableChange"
  :rowKey="data => data.id"
  @expand="getTransactionInnerData"
  showPagination="auto"
  :scroll="{ x: 'max-content' }"
>
  <a-table
    slot-scope="inner"
    :ref="'table-child-'+  inner.id "
    slot="expandedRowRender"
    :rowKey="data => data.id"
    :columns="orderDetailColumns"
    :data-source="inner.orderList"
    :pagination="false"
    :loading="confirmLoading"
  >
  </a-table>
  <span slot="expandIcon" slot-scope="props" class="table-operation item-group">
      // 自定义展开图标显示和不显示
   <template v-if="props.record.channelOrderNo=='11111'">
     <div @click="(e) => {props.onExpand(props.record, e);}" :class="props.expanded ? 'ant-table-row-expand-icon ant-table-row-expanded':'ant-table-row-expand-icon ant-table-row-collapsed'" role="button"></div>
   </template>
   <span v-else style="margin: 0 16px 0 0"></span>
  </span>
  <span slot="operation" slot-scope="text, record" class="table-operation item-group">
    <a slot="operation"  href="javascript:" v-if="record.isProcessed=='0' " v-action:transaction_hand_batch style="margin-left: 10px" @click="handleBatch(record)" >手动处理</a>
    <a slot="operation"  href="javascript:" v-if="record.isProcessed=='2'" v-action:transaction_cancel_batch style="margin-left: 10px" @click="cancelBatch(record)" >取消处理</a>
  </span>
</a-table>

getTransactionInnerData(expanded, record){
  let that = this;
  console.log('交易详情展开')
},
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值