Vanessa 2025-12-29 21:18:48 +08:00
parent d1422ea0df
commit ff5cf4c685

View file

@ -213,6 +213,9 @@ ${padHTML}
if (!blockElement) {
blockElement = getNoContainerElement(protyle.wysiwyg.element.firstElementChild) || protyle.wysiwyg.element.firstElementChild;
}
if (!blockElement) {
return;
}
const id = blockElement.getAttribute("data-node-id");
fetchPost("/api/block/getBlockBreadcrumb", {id, excludeTypes: []}, (response) => {
response.data.forEach((item: IBreadcrumb) => {
@ -603,6 +606,10 @@ ${padHTML}
if (!blockElement) {
blockElement = getNoContainerElement(protyle.wysiwyg.element.firstElementChild) || protyle.wysiwyg.element.firstElementChild;
}
if (!blockElement) {
// 浮窗删除单个块后,面包屑无法获取到 blockElement直接返回即可
return;
}
const id = blockElement.getAttribute("data-node-id");
if (id === this.id && !update) {
protyle.breadcrumb.element.querySelectorAll(".protyle-breadcrumb__item--active").forEach(item => {