<template #columns>
<a-table-column
v-for="item of tableColumns"
:key="item.key"
:align="item.align"
:title="item.title"
:width="item.width"
:data-index="item.key"
:fixed="item.fixed"
>
<template v-if="item.key === 'channelType'" #cell="{ record }">
{{ record.status === 'PERSON' ? '个人' : '企业' }}
</template>
<template v-if="item.key === 'status'" #cell="{ record }">
{{ record.status === 'NORMAL' ? '正常' : '停止' }}
</template>
</a-table-column>
</template>
多种选择( model-value="ENTERPRISE" 默认选中):
<template #columns>
<a-table-column
v-for="item of tableColumns"
:key="item.key"
:align="item.align"
:title="item.title"
:width="item.width"
:data-index="item.key"
:fixed="item.fixed"
>
<template v-if="item.key === 'channelType'" #cell="{ record }" model-value="ENTERPRISE">
<!-- {{ record.channelType === 'PERSON' ? '企业' : '个人' }} -->
<template v-if="record.channelType === 'PERSON'">个人</template>
<template v-if="record.channelType === 'ENTERPRISE'">企业</template>
</template>
<template v-if="item.key === 'status'" #cell="{ record }">
<template v-if="record.status === 'NORMAL'">正常</template>
<template v-if="record.status === 'STOP'">停止</template>
</template>
</a-table-column>
</template>
</a-table>
</template>