fix(components): [el-table] fixed column position error issue (#5430)

This commit is contained in:
msidolphin 2022-01-18 10:33:04 +08:00 committed by GitHub
parent 1d48642436
commit 300a570b5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -454,7 +454,9 @@ export const getFixedColumnsClass = <T>(
function getOffset<T>(offset: number, column: TableColumnCtx<T>) {
return (
offset +
(Number.isNaN(column.realWidth) ? Number(column.width) : column.realWidth)
(column.realWidth === null || Number.isNaN(column.realWidth)
? Number(column.width)
: column.realWidth)
)
}