mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-19 08:00:13 +01:00
This commit is contained in:
parent
737839f6bb
commit
ecf7e4a561
5 changed files with 15 additions and 16 deletions
|
|
@ -291,17 +291,12 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation, isUndo: bool
|
|||
} else {
|
||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => {
|
||||
item.removeAttribute("data-render");
|
||||
const isCurrent = item.querySelector(".av__pulse"); // ctrl+D 后点击添加行
|
||||
avRender(item, protyle, () => {
|
||||
if (operation.action === "insertAttrViewBlock") {
|
||||
item.querySelectorAll(".av__cell--select").forEach((cellElement: HTMLElement) => {
|
||||
cellElement.classList.remove("av__cell--select");
|
||||
});
|
||||
// https://github.com/siyuan-note/siyuan/issues/9599
|
||||
if (!isUndo && operation.isDetached && isCurrent) {
|
||||
popTextCell(protyle, [item.querySelector(`.av__row[data-id="${operation.srcIDs[0]}"] .av__cell[data-detached="true"]`)], "block");
|
||||
}
|
||||
} else if (operation.action === "addAttrViewCol" && isCurrent) {
|
||||
} else if (operation.action === "addAttrViewCol" && item.querySelector(".av__pulse")) {
|
||||
openMenuPanel({protyle, blockElement: item, type: "edit", colId: operation.id});
|
||||
}
|
||||
}, ["addAttrViewView", "duplicateAttrViewView"].includes(operation.action) ? operation.id :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue