fix(BasicTable): headerCell slot title not exist
parent
9acc73a591
commit
8ce86658ff
|
@ -144,11 +144,9 @@ export function useColumns(propsRef: ComputedRef<BasicTableProps>, getPagination
|
||||||
const mapFn = (column) => {
|
const mapFn = (column) => {
|
||||||
const { slots, customRender, format, edit, editRow, flag } = column
|
const { slots, customRender, format, edit, editRow, flag } = column
|
||||||
|
|
||||||
if (!slots || !slots?.title) {
|
if (!slots || !slots?.title)
|
||||||
// column.slots = { title: `header-${dataIndex}`, ...(slots || {}) };
|
|
||||||
column.customTitle = column.title
|
column.customTitle = column.title
|
||||||
Reflect.deleteProperty(column, 'title')
|
|
||||||
}
|
|
||||||
const isDefaultAction = [INDEX_COLUMN_FLAG, ACTION_COLUMN_FLAG].includes(flag)
|
const isDefaultAction = [INDEX_COLUMN_FLAG, ACTION_COLUMN_FLAG].includes(flag)
|
||||||
if (!customRender && format && !edit && !isDefaultAction) {
|
if (!customRender && format && !edit && !isDefaultAction) {
|
||||||
column.customRender = ({ text, record, index }) => {
|
column.customRender = ({ text, record, index }) => {
|
||||||
|
|
Loading…
Reference in New Issue