myliang / x-spreadsheet

The project has been migrated to @wolf-table/table https://github.com/wolf-table/table
https://myliang.github.io/x-spreadsheet
MIT License
13.98k stars 1.67k forks source link

row类的maxCell计算ci不正确 #599

Open childYoung opened 2 years ago

childYoung commented 2 years ago

core/row.js: maxCell() { const keys = Object.keys(this.); const ri = keys[keys.length - 1]; const col = this.[ri]; if (col) { const { cells } = col; const ks = Object.keys(cells); const ci = ks[ks.length - 1]; return [parseInt(ri, 10), parseInt(ci, 10)]; } return [0, 0]; }

maxCell() 方法计算的是将最后一行的cell的长度作为最大单元的列。比如第一行有6列内容,最后一行有4行内容,maxCell() 得出的最大列是4列,但是应该是6才对。