Skip to content

Actions not worker after antd vue upgrade to 3.0 #3

Closed
@incubator4

Description

@incubator4

The Component Table custom actions with

<template #bodyCell="{ column, text, record }">
  <template v-if="column.slots?.customRender === 'action'">
    <!-- etc -->
  </template>
</template>

But in ant design vue 3.x, it says Table deprecated column.slots, added v-slot:bodyCell, v-slot:headerCell, custom cells, and added column.customFilterDropdown v-slot:customFilterDropdown, custom filtering Menu, added v-slot:customFilterIcon custom filter button, but column.slots is still available, we will remove it in the next major version.

After add slots prop into columns , for example

export const columns: ColumnProps[] = [
  {
    title: 'Name',
    dataIndex: 'name',
    width: 150,
  },
  {
    title: 'Action',
    width: 120,
    slots: {
      customRender: 'action',
    },
  },
]

It doesn't behave as expected, render elements in . Instead, it renders nothing but blank space.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions