mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 00:20:12 +01:00
This commit is contained in:
parent
87472d1179
commit
1475fd9747
1 changed files with 3 additions and 3 deletions
|
|
@ -312,7 +312,7 @@ export class Backlink extends Model {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private toggleItem(liElement: HTMLElement, isMention:boolean) {
|
private toggleItem(liElement: HTMLElement, isMention: boolean) {
|
||||||
const svgElement = liElement.firstElementChild.firstElementChild;
|
const svgElement = liElement.firstElementChild.firstElementChild;
|
||||||
if (svgElement.classList.contains("b3-list-item__arrow--open")) {
|
if (svgElement.classList.contains("b3-list-item__arrow--open")) {
|
||||||
svgElement.classList.remove("b3-list-item__arrow--open");
|
svgElement.classList.remove("b3-list-item__arrow--open");
|
||||||
|
|
@ -322,7 +322,7 @@ export class Backlink extends Model {
|
||||||
if (liElement.nextElementSibling && liElement.nextElementSibling.tagName === "DIV") {
|
if (liElement.nextElementSibling && liElement.nextElementSibling.tagName === "DIV") {
|
||||||
liElement.nextElementSibling.classList.remove("fn__none");
|
liElement.nextElementSibling.classList.remove("fn__none");
|
||||||
} else {
|
} else {
|
||||||
fetchPost(isMention?"/api/ref/getBackmentionDoc":"/api/ref/getBacklinkDoc", {
|
fetchPost(isMention ? "/api/ref/getBackmentionDoc" : "/api/ref/getBacklinkDoc", {
|
||||||
defID: this.blockId,
|
defID: this.blockId,
|
||||||
refTreeID: liElement.getAttribute("data-node-id")
|
refTreeID: liElement.getAttribute("data-node-id")
|
||||||
}, (response) => {
|
}, (response) => {
|
||||||
|
|
@ -331,7 +331,7 @@ export class Backlink extends Model {
|
||||||
liElement.after(editorElement);
|
liElement.after(editorElement);
|
||||||
const editor = new Protyle(editorElement, {
|
const editor = new Protyle(editorElement, {
|
||||||
blockId: "",
|
blockId: "",
|
||||||
backlinkData: response.data.backlinks,
|
backlinkData: isMention ? response.data.backmentions : response.data.backlinks,
|
||||||
render: {
|
render: {
|
||||||
background: false,
|
background: false,
|
||||||
title: false,
|
title: false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue