实现效果
html代码
<a-table
rowKey="id"
:columns="columns"
:data-source="dataSource"
:defaultExpandAllRows="false">
<template #expandedRowRender="{ record }">
<div style="margin: 0; display: flex">
<div style="margin-right: 20px; font-weight: 600">来源</div>
{{ record.source }}
</div>
</template>
<template #expandIcon="props">
<span v-if="props.expanded" @click="(e) => props.onExpand(props.record, e)">xx</span>
<span v-else @click="(e) => props.onExpand(props.record, e)">qq</span>
</template>
</a-table>