mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-27 02:36:10 +01:00
This commit is contained in:
parent
d519732c79
commit
f2c2a7592c
14 changed files with 203 additions and 94 deletions
|
|
@ -48,11 +48,13 @@ export const openViewMenu = (options: { protyle: IProtyle, blockElement: HTMLEle
|
|||
action: "duplicateAttrViewView",
|
||||
avID: options.blockElement.dataset.avId,
|
||||
previousID: options.element.dataset.id,
|
||||
id
|
||||
id,
|
||||
blockID: options.blockElement.dataset.nodeId
|
||||
}], [{
|
||||
action: "removeAttrViewView",
|
||||
avID: options.blockElement.dataset.avId,
|
||||
id
|
||||
id,
|
||||
blockID: options.blockElement.dataset.nodeId
|
||||
}]);
|
||||
options.blockElement.setAttribute("custom-sy-av-view", id)
|
||||
}
|
||||
|
|
@ -68,7 +70,8 @@ export const openViewMenu = (options: { protyle: IProtyle, blockElement: HTMLEle
|
|||
transaction(options.protyle, [{
|
||||
action: "removeAttrViewView",
|
||||
avID: options.blockElement.dataset.avId,
|
||||
id: options.element.dataset.id
|
||||
id: options.element.dataset.id,
|
||||
blockID: options.blockElement.dataset.nodeId
|
||||
}]);
|
||||
}
|
||||
}
|
||||
|
|
@ -199,11 +202,13 @@ export const addView = (protyle: IProtyle, blockElement: Element) => {
|
|||
transaction(protyle, [{
|
||||
action: "addAttrViewView",
|
||||
avID,
|
||||
id
|
||||
id,
|
||||
blockID: blockElement.getAttribute("data-node-id")
|
||||
}], [{
|
||||
action: "removeAttrViewView",
|
||||
avID,
|
||||
id
|
||||
id,
|
||||
blockID: blockElement.getAttribute("data-node-id")
|
||||
}]);
|
||||
blockElement.setAttribute("custom-sy-av-view", id);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue