mirror of
https://github.com/element-plus/element-plus.git
synced 2024-11-21 01:02:59 +08:00
fix: popover repeat when exist fixed column in table (#3394)
* fix: popover repeat when exist fixed column in table * Update render-helper.ts
This commit is contained in:
parent
2bd4d533e4
commit
89ede5d05f
@ -32,6 +32,7 @@ function useRender<T>(props: Partial<TableBodyProps<T>>) {
|
||||
getCellClass,
|
||||
getSpan,
|
||||
getColspanRealWidth,
|
||||
isColumnHidden,
|
||||
} = useStyles(props)
|
||||
const firstDefaultColumnIndex = computed(() => {
|
||||
return props.store.states.columns.value.findIndex(
|
||||
@ -107,6 +108,7 @@ function useRender<T>(props: Partial<TableBodyProps<T>>) {
|
||||
}
|
||||
const baseKey = `${$index},${cellIndex}`
|
||||
const patchKey = columnData.columnKey || columnData.rawColumnKey || ''
|
||||
const tdChildren = cellChildren(cellIndex, column, data)
|
||||
return h(
|
||||
'td',
|
||||
{
|
||||
@ -119,11 +121,14 @@ function useRender<T>(props: Partial<TableBodyProps<T>>) {
|
||||
handleCellMouseEnter($event, { ...row, tooltipEffect }),
|
||||
onMouseleave: handleCellMouseLeave,
|
||||
},
|
||||
[column.renderCell(data)]
|
||||
[tdChildren]
|
||||
)
|
||||
})
|
||||
)
|
||||
}
|
||||
const cellChildren = (cellIndex, column, data) => {
|
||||
return isColumnHidden(cellIndex) ? null : column.renderCell(data)
|
||||
}
|
||||
const wrappedRowRender = (row: T, $index: number) => {
|
||||
const store = props.store
|
||||
const { isRowExpanded, assertRowKey } = store
|
||||
|
Loading…
Reference in New Issue
Block a user