🎨 推送
This commit is contained in:
parent
d2670874c0
commit
5b413d6fb4
1 changed files with 4 additions and 4 deletions
|
@ -179,14 +179,14 @@ export const setDefRefCount = (data: {
|
|||
const attrElement = editor.protyle.title.element.querySelector(".protyle-attr");
|
||||
const countElement = attrElement.querySelector(".protyle-attr--refcount");
|
||||
if (countElement) {
|
||||
if (data.refCount === 0) {
|
||||
if (data.rootRefCount === 0) {
|
||||
countElement.remove();
|
||||
} else {
|
||||
countElement.textContent = data.refCount.toString();
|
||||
countElement.textContent = data.rootRefCount.toString();
|
||||
countElement.setAttribute("data-id", JSON.stringify(data.refIDs));
|
||||
}
|
||||
} else if (data.refCount > 0) {
|
||||
attrElement.insertAdjacentHTML("beforeend", `<div class="protyle-attr--refcount popover__block" data-defids="["${data.blockID}"]" data-id="${JSON.stringify(data.refIDs)}" style="">${data.refCount}</div>`);
|
||||
} else if (data.rootRefCount > 0) {
|
||||
attrElement.insertAdjacentHTML("beforeend", `<div class="protyle-attr--refcount popover__block" data-defids="["${data.blockID}"]" data-id="${JSON.stringify(data.refIDs)}" style="">${data.rootRefCount}</div>`);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue