Vanessa 2025-02-10 11:02:05 +08:00
parent e01b7256b5
commit 2fc5fcb651
4 changed files with 9 additions and 9 deletions

View file

@ -81,7 +81,7 @@ export const newFile = (optios: {
useSavePath: boolean,
name?: string,
afterCB?: (id: string, title: string) => void
pushCreateEvt?: boolean
listDocTree?: boolean
}) => {
if (getOpenNotebookCount() === 0) {
showMessage(window.siyuan.languages.newFileTip);
@ -104,7 +104,7 @@ export const newFile = (optios: {
path: createPath,
// 根目录时无法确定 parentID
markdown: "",
pushCreateEvt: optios.pushCreateEvt
listDocTree: optios.listDocTree
}, response => {
if (optios.afterCB) {
optios.afterCB(response.data, pathPosix().basename(createPath));
@ -130,7 +130,7 @@ export const newFile = (optios: {
path: createPath,
parentID: getDisplayName(optios.currentPath, true, true),
markdown: "",
pushCreateEvt: optios.pushCreateEvt
listDocTree: optios.listDocTree
}, response => {
if (optios.afterCB) {
optios.afterCB(response.data, pathPosix().basename(createPath));
@ -158,7 +158,7 @@ export const newFile = (optios: {
notebook: data.data.box,
path: createPath,
markdown: "",
pushCreateEvt: optios.pushCreateEvt
listDocTree: optios.listDocTree
}, response => {
if (optios.afterCB) {
optios.afterCB(response.data, pathPosix().basename(createPath));
@ -187,7 +187,7 @@ export const newFile = (optios: {
title,
md: "",
sorts: optios.paths,
pushCreateEvt: optios.pushCreateEvt
listDocTree: optios.listDocTree
}, () => {
if (optios.afterCB) {
optios.afterCB(id, title);