mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
657d938a9a
commit
07b0ccbabe
2 changed files with 6 additions and 1 deletions
|
|
@ -398,6 +398,7 @@ const newTab = (options: IOpenFileOptions) => {
|
|||
title: options.custom.title,
|
||||
callback(tab) {
|
||||
tab.addModel(options.custom.fn({
|
||||
app: options.app,
|
||||
tab,
|
||||
data: options.custom.data
|
||||
}));
|
||||
|
|
|
|||
6
app/src/types/index.d.ts
vendored
6
app/src/types/index.d.ts
vendored
|
|
@ -323,7 +323,11 @@ declare interface IOpenFileOptions {
|
|||
title: string,
|
||||
icon: string,
|
||||
data?: any
|
||||
fn?: (options: { tab: import("../layout/Tab").Tab, data: any }) => import("../layout/Model").Model,
|
||||
fn?: (options: {
|
||||
tab: import("../layout/Tab").Tab,
|
||||
data: any,
|
||||
app: import("../index").App
|
||||
}) => import("../layout/Model").Model,
|
||||
}
|
||||
assetPath?: string, // asset 必填
|
||||
fileName?: string, // file 必填
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue