<a-table
:columns="sourcesTableColumns"
:pagination="false"
:data-source="conetnt.text.SourceList"
:expandedRowKeys="expandedRowKeys"
:rowKey="(record,index)=>{return record.paragraphsId}"
:expandIconAsCell="false"
:expandIconColumnIndex="-1"
bordered
>
<template slot="action" slot-scope="text, record, index">
<a href="javascript:;" class="add" @click="handleExpand(record, index)" v-else>{{expandedRowKeys.indexOf(record.paragraphsId)==-1?'展开':'收起'}}</a>
</template>
<p slot="expandedRowRender" slot-scope="record" style="margin: 0">
{{ record.content }}
</a>
</p>
</a-table>
主要使用这两个属性:
:expandIconAsCell="false"
:expandIconColumnIndex="-1"