feat: add sheet default rows stting

This commit is contained in:
雷军 2023-12-29 10:57:11 +08:00
parent 63c041ba05
commit 0346ab7ca3

View file

@ -106,7 +106,8 @@ export class ExcelView extends TextFileView {
var sheetAny = sheet as any
if (sheetAny.rows) {
const last = Object.keys(sheetAny.rows).last() || "100"
sheetAny.rows.len = Math.max(100, parseInt(last) + 20)
const max = parseInt(this.plugin.settings.defaultRowsLen)
sheetAny.rows.len = Math.max(max, parseInt(last) + 20)
}
})
this.saveData(JSON.stringify(sheetData))