mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
🚨
This commit is contained in:
parent
0fe6759bde
commit
5987b0cea7
7 changed files with 21 additions and 21 deletions
|
|
@ -12,8 +12,8 @@ import {Constants} from "../constants";
|
|||
import {validateName} from "../editor/rename";
|
||||
|
||||
export const getNewFilePath = (useSavePath: boolean) => {
|
||||
let notebookId = ""
|
||||
let currentPath = ""
|
||||
let notebookId = "";
|
||||
let currentPath = "";
|
||||
/// #if !MOBILE
|
||||
getAllModels().editor.find((item) => {
|
||||
const currentElement = item.parent.headElement;
|
||||
|
|
@ -57,8 +57,8 @@ export const getNewFilePath = (useSavePath: boolean) => {
|
|||
}
|
||||
});
|
||||
}
|
||||
return {notebookId, currentPath}
|
||||
}
|
||||
return {notebookId, currentPath};
|
||||
};
|
||||
|
||||
export const newFile = (notebookId?: string, currentPath?: string, paths?: string[], useSavePath = false) => {
|
||||
if (getOpenNotebookCount() === 0) {
|
||||
|
|
@ -66,7 +66,7 @@ export const newFile = (notebookId?: string, currentPath?: string, paths?: strin
|
|||
return;
|
||||
}
|
||||
if (!notebookId) {
|
||||
const resultData = getNewFilePath(useSavePath)
|
||||
const resultData = getNewFilePath(useSavePath);
|
||||
notebookId = resultData.notebookId;
|
||||
currentPath = resultData.currentPath;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue