mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 16:10:12 +01:00
This commit is contained in:
parent
8f3518c645
commit
03b3de4d16
1 changed files with 5 additions and 0 deletions
|
|
@ -101,7 +101,12 @@ export const avRender = (element: Element, cb?: () => void) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let lastparentID:string
|
||||||
export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
||||||
|
if (lastparentID === operation.parentID) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
lastparentID = operation.parentID;
|
||||||
if (operation.action === "addAttrViewCol") {
|
if (operation.action === "addAttrViewCol") {
|
||||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.parentID}"]`)).forEach((item: HTMLElement) => {
|
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.parentID}"]`)).forEach((item: HTMLElement) => {
|
||||||
item.removeAttribute("data-render");
|
item.removeAttribute("data-render");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue