mirror of
https://gitee.com/element-plus/element-plus.git
synced 2024-11-30 02:08:12 +08:00
fix(components): [table] maxHeight shark (#12349)
This commit is contained in:
parent
9ba2ed7013
commit
015ac099cb
@ -309,16 +309,12 @@ function useStyle<T>(
|
||||
}
|
||||
if (props.maxHeight) {
|
||||
if (!Number.isNaN(Number(props.maxHeight))) {
|
||||
const maxHeight = props.maxHeight
|
||||
const reachMaxHeight = tableScrollHeight.value >= Number(maxHeight)
|
||||
if (reachMaxHeight) {
|
||||
return {
|
||||
maxHeight: `${
|
||||
tableScrollHeight.value -
|
||||
headerScrollHeight.value -
|
||||
footerScrollHeight.value
|
||||
}px`,
|
||||
}
|
||||
return {
|
||||
maxHeight: `${
|
||||
props.maxHeight -
|
||||
headerScrollHeight.value -
|
||||
footerScrollHeight.value
|
||||
}px`,
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
|
Loading…
Reference in New Issue
Block a user