diff --git a/app/src/protyle/render/av/col.ts b/app/src/protyle/render/av/col.ts index f5fb09df2..14887c8ab 100644 --- a/app/src/protyle/render/av/col.ts +++ b/app/src/protyle/render/av/col.ts @@ -439,10 +439,11 @@ const addAttrViewColAnimation = (options: { } let html = ""; if (index === 0) { + // av__pulse 用于检测是否新增,和 render 中 isPulse 配合弹出菜单 html = `
${options.icon ? unicode2Emoji(options.icon, "av__cellheadericon", true) : ``} ${options.name} -
+
`; } else { html = '
'; diff --git a/app/src/protyle/render/av/render.ts b/app/src/protyle/render/av/render.ts index 310af1703..ab26f7ce2 100644 --- a/app/src/protyle/render/av/render.ts +++ b/app/src/protyle/render/av/render.ts @@ -290,8 +290,9 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => { } else { Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => { item.removeAttribute("data-render"); + const isPulse = item.querySelector(".av__pulse"); avRender(item, protyle, () => { - if (operation.action === "addAttrViewCol" && item.querySelector(".av__pulse")) { + if (operation.action === "addAttrViewCol" && isPulse) { openMenuPanel({protyle, blockElement: item, type: "edit", colId: operation.id}); } }, ["addAttrViewView", "duplicateAttrViewView"].includes(operation.action) ? operation.id :