diff --git a/package.json b/package.json index ac13be3..8807dc9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kne/info-page", - "version": "0.1.3", + "version": "0.1.4", "description": "一般用在复杂的详情展示页面,InfoPage提供了一个标准的展示信息的格式", "syntax": { "esmodules": true diff --git a/src/TableView/boxComputed.js b/src/TableView/boxComputed.js index 53b798f..03cf5ca 100644 --- a/src/TableView/boxComputed.js +++ b/src/TableView/boxComputed.js @@ -14,7 +14,7 @@ const boxComputed = (columns, col) => { box.push([]); } let currentLine = box[box.length - 1]; - const legacy = + let legacy = 24 - currentLine.reduce((a, b) => { return a + b.span; @@ -22,6 +22,7 @@ const boxComputed = (columns, col) => { if (legacy < currentSpan) { currentLine[currentLine.length - 1].span += legacy; box.push([]); + legacy = 24; currentLine = box[box.length - 1]; } const isLast = index === columns.length - 1;