Bug Fixes for v 2.4.4

This commit is contained in:
jiaming743 2019-09-05 17:32:44 +08:00
parent 786761f1ca
commit 6169d2ac90
1 changed files with 7 additions and 2 deletions

View File

@ -260,11 +260,16 @@ export default {
calcWidths () {
const { width, mergedConfig, rowsData } = this
const { columnWidth } = mergedConfig
const { columnWidth, header } = mergedConfig
const usedWidth = columnWidth.reduce((all, w) => all + w, 0)
const columnNum = rowsData[0] ? rowsData[0].ceils.length : 0
let columnNum = 0
if (rowsData[0]) {
columnNum = rowsData[0].ceils.length
} else if (header.length) {
columnNum = header.length
}
const avgWidth = (width - usedWidth) / (columnNum - columnWidth.length)