mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user