Vanessa 2023-07-01 12:15:31 +08:00
parent 86c177e03c
commit 27d84bcdd3
3 changed files with 2 additions and 4 deletions

View file

@ -71,7 +71,6 @@ const updateCellValue = (protyle: IProtyle, cellElement: HTMLElement, type: TAVC
[type]: {content: cellElement.textContent.trim()}
}
}]);
cellElement.textContent = inputElement.value;
setTimeout(() => {
avMaskElement.remove();
});
@ -108,7 +107,6 @@ export const showHeaderCellMenu = (protyle: IProtyle, blockElement: HTMLElement,
name: cellElement.textContent.trim(),
type,
}]);
cellElement.textContent = newValue;
});
menu.addItem({
icon: getColIconByType(type),

View file

@ -109,7 +109,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
showHeaderCellMenu(protyle, item, item.querySelector(".av__row--header").lastElementChild.previousElementSibling as HTMLElement);
});
});
} else if (operation.action === "insertAttrViewBlock") {
} else {
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.parentID}"]`)).forEach((item: HTMLElement) => {
item.removeAttribute("data-render");
avRender(item);

View file

@ -651,7 +651,7 @@ export const onTransaction = (protyle: IProtyle, operation: IOperation, focus: b
updateRef(protyle, operation.id);
} else if (operation.action === "append") {
reloadProtyle(protyle, false);
} else if (["addAttrViewCol", "insertAttrViewBlock"].includes(operation.action)) {
} else if (["addAttrViewCol", "insertAttrViewBlock", "updateAttrViewCol", "updateAttrViewCell"].includes(operation.action)) {
refreshAV(protyle, operation);
}
};