mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 07:30:12 +01:00
This commit is contained in:
parent
9c28056204
commit
ad39590205
7 changed files with 105 additions and 61 deletions
|
|
@ -296,12 +296,15 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
if (operation.action === "addAttrViewCol" && isPulse) {
|
||||
openMenuPanel({protyle, blockElement: item, type: "edit", colId: operation.id});
|
||||
}
|
||||
if (["updateAttrViewColRollup","updateAttrViewColTemplate", "updateAttrViewCell", "addAttrViewCol"].includes(operation.action)) {
|
||||
const attrElement = document.querySelector(`.b3-dialog--open[data-key="${Constants.DIALOG_ATTR}"] div[data-av-id="${operation.avID}"]`) as HTMLElement;
|
||||
if (attrElement) {
|
||||
// 更新属性面板
|
||||
renderAVAttribute(attrElement.parentElement, attrElement.dataset.nodeId, protyle);
|
||||
}
|
||||
|
||||
const attrElement = document.querySelector(`.b3-dialog--open[data-key="${Constants.DIALOG_ATTR}"] div[data-av-id="${operation.avID}"]`) as HTMLElement;
|
||||
if (attrElement) {
|
||||
// 更新属性面板
|
||||
renderAVAttribute(attrElement.parentElement, attrElement.dataset.nodeId, protyle, (newElment) => {
|
||||
if (operation.action === "addAttrViewCol") {
|
||||
openMenuPanel({protyle, blockElement: newElment.querySelector(`div[data-av-id="${operation.avID}"]`), type: "edit", colId: operation.id});
|
||||
}
|
||||
});
|
||||
}
|
||||
}, ["addAttrViewView", "duplicateAttrViewView"].includes(operation.action) ? operation.id :
|
||||
(operation.action === "removeAttrViewView" ? null : undefined));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue