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()} [type]: {content: cellElement.textContent.trim()}
} }
}]); }]);
cellElement.textContent = inputElement.value;
setTimeout(() => { setTimeout(() => {
avMaskElement.remove(); avMaskElement.remove();
}); });
@ -108,7 +107,6 @@ export const showHeaderCellMenu = (protyle: IProtyle, blockElement: HTMLElement,
name: cellElement.textContent.trim(), name: cellElement.textContent.trim(),
type, type,
}]); }]);
cellElement.textContent = newValue;
}); });
menu.addItem({ menu.addItem({
icon: getColIconByType(type), 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); 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) => { Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.parentID}"]`)).forEach((item: HTMLElement) => {
item.removeAttribute("data-render"); item.removeAttribute("data-render");
avRender(item); avRender(item);

View file

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