Closed incubator4 closed 2 years ago
After move slot
block under bodyCell
slot with new style <template #action="{ record }">
it works.
But columns.slots has been deprecated, does it have any better format with actions ?
update
After move
slot
block underbodyCell
slot with new style<template #action="{ record }">
it works. But columns.slots has been deprecated, does it have any better format with actions ?
Thank you for your reply
antv
to 3.x
, and I'm thinking of a better way for the Table
problem2.x
version transition, in order not to destroy the original design of a component ideas, and did not make large-scale changes, some destructive issues worth continuing to think3.x
version directly for development and useWelcome to communicate and discuss
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.
Hello. For ant-design -vue3.x version left some issues, I have submitted an update, welcome to discuss together 😀
The Component
Table
custom actions withBut 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
It doesn't behave as expected, render elements in . Instead, it renders nothing but blank space.