mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
This commit is contained in:
parent
bf38219c0a
commit
a3252dbce5
1 changed files with 40 additions and 41 deletions
|
|
@ -728,6 +728,12 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
refreshTimeouts[protyle.id] = window.setTimeout(() => {
|
||||
// 修改表格名 avID 传入到 id 上了 https://github.com/siyuan-note/siyuan/issues/12724
|
||||
const avID = operation.action === "setAttrViewName" ? operation.id : operation.avID;
|
||||
const attrElement = document.querySelector(`.b3-dialog--open[data-key="${Constants.DIALOG_ATTR}"] .custom-attr > [data-av-id="${avID}"]`) as HTMLElement;
|
||||
if (attrElement) {
|
||||
// 更新属性面板
|
||||
attrElement.removeAttribute("data-rendering");
|
||||
renderAVAttribute(attrElement.parentElement, attrElement.dataset.nodeId, protyle);
|
||||
}
|
||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`.av[data-av-id="${avID}"]`)).forEach((item: HTMLElement) => {
|
||||
item.removeAttribute("data-render");
|
||||
if (operation.action === "sortAttrViewRow") {
|
||||
|
|
@ -763,12 +769,6 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
}
|
||||
const hasGhost = item.querySelector('[data-type="ghost"]');
|
||||
avRender(item, protyle, () => {
|
||||
const attrElement = document.querySelector(`.b3-dialog--open[data-key="${Constants.DIALOG_ATTR}"] .custom-attr > [data-av-id="${avID}"]`) as HTMLElement;
|
||||
if (attrElement) {
|
||||
// 更新属性面板
|
||||
attrElement.removeAttribute("data-rendering");
|
||||
renderAVAttribute(attrElement.parentElement, attrElement.dataset.nodeId, protyle);
|
||||
} else {
|
||||
if (operation.action === "insertAttrViewBlock" && operation.context?.ignoreTip !== "true") {
|
||||
if (operation.context?.message) {
|
||||
showMessage(operation.context.message);
|
||||
|
|
@ -809,7 +809,6 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
|||
openMenuPanel({protyle, blockElement: item, type: "config"});
|
||||
}
|
||||
}
|
||||
}
|
||||
item.removeAttribute("data-loading");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue