mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
86c177e03c
commit
27d84bcdd3
3 changed files with 2 additions and 4 deletions
|
|
@ -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),
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue