mirror of
https://github.com/ljcoder2015/obsidian-excel.git
synced 2026-07-22 08:30:28 +00:00
fix: 导入导出按钮添加时机修改
This commit is contained in:
parent
d8a7bd240e
commit
18414837e6
1 changed files with 13 additions and 17 deletions
|
|
@ -61,23 +61,6 @@ export class ExcelView extends TextFileView {
|
|||
this.handleFile.bind(this),
|
||||
false
|
||||
);
|
||||
|
||||
// 添加顶部导入按钮
|
||||
if (!this.importEle) {
|
||||
this.importEle = this.addAction(
|
||||
"download",
|
||||
"import xlsx file",
|
||||
(ev) => this.handleImportClick(ev)
|
||||
);
|
||||
}
|
||||
|
||||
if (!this.exportEle) {
|
||||
this.exportEle = this.addAction(
|
||||
"upload",
|
||||
"export xlsx file",
|
||||
(ev) => this.handleExportClick(ev)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// 处理顶部导入按钮点击事件
|
||||
|
|
@ -121,6 +104,19 @@ export class ExcelView extends TextFileView {
|
|||
typeof this.containerEl.onWindowMigrated === "undefined"
|
||||
);
|
||||
this.ownerWindow = this.containerEl.win;
|
||||
|
||||
// 添加顶部导入按钮
|
||||
this.importEle = this.addAction(
|
||||
"download",
|
||||
"import xlsx file",
|
||||
(ev) => this.handleImportClick(ev)
|
||||
);
|
||||
|
||||
this.exportEle = this.addAction(
|
||||
"upload",
|
||||
"export xlsx file",
|
||||
(ev) => this.handleExportClick(ev)
|
||||
);
|
||||
}
|
||||
|
||||
clear(): void {
|
||||
|
|
|
|||
Loading…
Reference in a new issue