mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 11:20:16 +01:00
This commit is contained in:
parent
56129699b9
commit
bc78b43dfe
5 changed files with 64 additions and 14 deletions
|
|
@ -364,7 +364,7 @@ export class Breadcrumb {
|
|||
this.id = id;
|
||||
fetchPost("/api/block/getBlockBreadcrumb", {id}, (response) => {
|
||||
let html = "";
|
||||
response.data.forEach((item: { id: string, name: string, type: string, subType: string, children: [] }, index: number) => {
|
||||
response.data.forEach((item: IBreadcrumb, index: number) => {
|
||||
let isCurrent = false;
|
||||
if (!protyle.block.showAll && item.id === protyle.block.parentID) {
|
||||
isCurrent = true;
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import {Background} from "./header/Background";
|
|||
import {getDisplayName} from "../util/pathName";
|
||||
import {onGet} from "./util/onGet";
|
||||
import {reloadProtyle} from "./util/reload";
|
||||
import {renderBacklink} from "./wysiwyg/renderBacklink";
|
||||
|
||||
class Protyle {
|
||||
|
||||
|
|
@ -155,6 +156,11 @@ class Protyle {
|
|||
}
|
||||
}
|
||||
});
|
||||
setPadding(this.protyle);
|
||||
if (options.backlinkData) {
|
||||
renderBacklink(this.protyle, options.backlinkData)
|
||||
return
|
||||
}
|
||||
fetchPost("/api/filetree/getDoc", {
|
||||
id: options.blockId,
|
||||
k: options.key || "",
|
||||
|
|
@ -201,7 +207,6 @@ class Protyle {
|
|||
mergedOptions.after(this);
|
||||
}
|
||||
});
|
||||
setPadding(this.protyle);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
6
app/src/protyle/wysiwyg/renderBacklink.ts
Normal file
6
app/src/protyle/wysiwyg/renderBacklink.ts
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
export const renderBacklink = (protype: IProtyle, backlinkData: {
|
||||
blockPaths: IBreadcrumb[],
|
||||
dom: string
|
||||
}[]) => {
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue