This commit is contained in:
parent
251e8b3234
commit
98c6fca20f
3 changed files with 21 additions and 0 deletions
|
@ -64,10 +64,16 @@ export const getDocByScroll = (options: {
|
|||
fetchPost("/api/filetree/getDoc", {
|
||||
id: options.scrollAttr.zoomInId,
|
||||
size: Constants.SIZE_GET_MAX,
|
||||
key: options.protyle.query?.key,
|
||||
queryMethod: options.protyle.query?.method,
|
||||
queryTypes: options.protyle.query?.types,
|
||||
}, response => {
|
||||
if (response.code === 1) {
|
||||
fetchPost("/api/filetree/getDoc", {
|
||||
id: options.scrollAttr.rootId || options.mergedOptions?.blockId || options.protyle.block?.rootID || options.scrollAttr.startId,
|
||||
key: options.protyle.query?.key,
|
||||
queryMethod: options.protyle.query?.method,
|
||||
queryTypes: options.protyle.query?.types,
|
||||
}, response => {
|
||||
onGet({
|
||||
data: response,
|
||||
|
@ -94,6 +100,9 @@ export const getDocByScroll = (options: {
|
|||
id: options.scrollAttr.rootId || options.mergedOptions?.blockId || options.protyle.block?.rootID || options.scrollAttr.startId,
|
||||
startID: options.scrollAttr.startId,
|
||||
endID: options.scrollAttr.endId,
|
||||
key: options.protyle.query?.key,
|
||||
queryMethod: options.protyle.query?.method,
|
||||
queryTypes: options.protyle.query?.types,
|
||||
}, response => {
|
||||
onGet({
|
||||
data: response,
|
||||
|
|
|
@ -1179,6 +1179,11 @@ export const getArticle = (options: {
|
|||
size: zoomIn ? Constants.SIZE_GET_MAX : window.siyuan.config.editor.dynamicLoadBlocks,
|
||||
zoom: zoomIn,
|
||||
}, getResponse => {
|
||||
options.edit.protyle.query = {
|
||||
key: options.value || null,
|
||||
method: options.config?.method || null,
|
||||
types: options.config?.types || null,
|
||||
};
|
||||
onGet({
|
||||
updateReadonly: true,
|
||||
data: getResponse,
|
||||
|
|
7
app/src/types/protyle.d.ts
vendored
7
app/src/types/protyle.d.ts
vendored
|
@ -1,3 +1,5 @@
|
|||
import IUILayoutTabSearchConfigTypes = Config.IUILayoutTabSearchConfigTypes;
|
||||
|
||||
interface ILuteNode {
|
||||
TokensStr: () => string;
|
||||
__internal_object__: {
|
||||
|
@ -445,6 +447,11 @@ interface IProtyle {
|
|||
app: import("../index").App,
|
||||
transactionTime: number,
|
||||
id: string,
|
||||
query?: {
|
||||
key: string,
|
||||
method: number
|
||||
types: IUILayoutTabSearchConfigTypes
|
||||
},
|
||||
block: {
|
||||
id?: string,
|
||||
scroll?: boolean
|
||||
|
|
Loading…
Add table
Reference in a new issue