This commit is contained in:
Vanessa 2023-05-29 11:20:08 +08:00
parent 6c4753d290
commit e4b14a12c6
8 changed files with 32 additions and 29 deletions

View file

@ -45,9 +45,6 @@ export const openFileById = async (options: {
showMessage(data.msg);
return;
}
if (typeof options.removeCurrentTab === "undefined") {
options.removeCurrentTab = true;
}
openFile({
app: options.app,
fileName: data.data.rootTitle,
@ -80,6 +77,9 @@ export const openAsset = (app: App, assetPath: string, page: number | string, po
};
export const openFile = (options: IOpenFileOptions) => {
if (typeof options.removeCurrentTab === "undefined") {
options.removeCurrentTab = true;
}
const allModels = getAllModels();
// 文档已打开
if (options.assetPath) {