refactor: 简化表格行minHeight最大值的处理
This commit is contained in:
@@ -1428,12 +1428,11 @@ export class Draw {
|
|||||||
const emptyMainHeight = (height - marginHeight - rowMargin * 2) / scale
|
const emptyMainHeight = (height - marginHeight - rowMargin * 2) / scale
|
||||||
trList.forEach(tr => {
|
trList.forEach(tr => {
|
||||||
if (tr.minHeight && tr.minHeight > emptyMainHeight) {
|
if (tr.minHeight && tr.minHeight > emptyMainHeight) {
|
||||||
const reduceHeight = tr.minHeight - emptyMainHeight
|
tr.height = emptyMainHeight
|
||||||
tr.height -= reduceHeight
|
tr.minHeight = emptyMainHeight
|
||||||
tr.minHeight -= reduceHeight
|
|
||||||
tr.tdList.forEach(td => {
|
tr.tdList.forEach(td => {
|
||||||
td.realMinHeight && (td.realMinHeight -= reduceHeight)
|
td.realHeight = emptyMainHeight
|
||||||
td.realHeight && (td.realHeight -= reduceHeight)
|
td.realMinHeight = emptyMainHeight
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user