mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-21 11:30:42 +08:00
🎨 Backlink count at the doc block title including sub-blocks https://github.com/siyuan-note/siyuan/issues/13791
This commit is contained in:
parent
91ee1ccf0b
commit
3ebcf5fcb9
@ -173,10 +173,7 @@ export const setDefRefCount = (data: {
|
||||
rootRefIDs: string[]
|
||||
}) => {
|
||||
getAllEditor().forEach(editor => {
|
||||
if (editor.protyle.block.rootID === data.rootID) {
|
||||
if (!editor.protyle.title) {
|
||||
return;
|
||||
}
|
||||
if (editor.protyle.block.rootID === data.rootID && editor.protyle.title) {
|
||||
const attrElement = editor.protyle.title.element.querySelector(".protyle-attr");
|
||||
const countElement = attrElement.querySelector(".protyle-attr--refcount");
|
||||
if (countElement) {
|
||||
@ -189,7 +186,6 @@ export const setDefRefCount = (data: {
|
||||
} else if (data.rootRefCount > 0) {
|
||||
attrElement.insertAdjacentHTML("beforeend", `<div class="protyle-attr--refcount popover__block" data-defids="["${data.rootID}"]" data-id="${JSON.stringify(data.rootRefIDs)}" style="">${data.rootRefCount}</div>`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (data.rootID === data.blockID) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user