fix: delete sheet not save, dark mode setting bug, sheet name bug

This commit is contained in:
雷军 2023-11-06 10:22:39 +08:00
parent e19c7ced50
commit 437a3d4a3f
2 changed files with 6 additions and 0 deletions

View file

@ -27,6 +27,7 @@ export class ExcelSettingTab extends PluginSettingTab {
.setValue(this.plugin.settings.theme)
.onChange(async (value) => {
this.plugin.settings.theme = value
this.plugin.saveSettings()
}),
);

View file

@ -260,6 +260,11 @@ export class ExcelView extends TextFileView {
const data = this.sheet.getData();
// console.log('onRenameSheet', data)
this.saveData(JSON.stringify(data));
})
.onDeleteSheet(() => {
const data = this.sheet.getData();
// console.log('onDeleteSheet', data)
this.saveData(JSON.stringify(data));
});
this.sheet.on("cells-selected", (sheetData, { sri, sci, eri, eci }) => {