Vanessa 2023-07-01 20:48:44 +08:00
parent 8f3518c645
commit 03b3de4d16

View file

@ -101,7 +101,12 @@ export const avRender = (element: Element, cb?: () => void) => {
}
};
let lastparentID:string
export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
if (lastparentID === operation.parentID) {
return
}
lastparentID = operation.parentID;
if (operation.action === "addAttrViewCol") {
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.parentID}"]`)).forEach((item: HTMLElement) => {
item.removeAttribute("data-render");