首先在table中
<a-table ...>
<template #action="{ record }">
<span class="action">
<a>移除</a>
</span>
</template>
</a-table>
const columns = [{
title: '操作',
key: 'action',
slots: { customRender: 'action' },
}
在form表单的form-item中,正常是在a-form-item直接设置label='啥啥啥',需要插槽的时候
<a-form-item>
<template #label>
<span style="color: red">* </span>
<span>展示时间</span>
</template>
...
</a-form-item>
vue3.0+antdVue2.0结合插槽slots的使用方式
发布时间 2023-11-16 16:15:01作者: Felix_Openmind