vue3.0+antdVue2.0结合插槽slots的使用方式

首先在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>

posted @ 2023-11-16 16:09  Felix_Openmind  阅读(135)  评论(0)    收藏  举报
*{cursor: url(https://files-cdn.cnblogs.com/files/morango/fish-cursor.ico),auto;}