mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 00:50:13 +01:00
This commit is contained in:
parent
2b580d8b1d
commit
f4fce9a1c1
1 changed files with 4 additions and 2 deletions
|
|
@ -433,7 +433,9 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${operation.avID}"]`)).forEach((item: HTMLElement) => {
|
// 修改表格名 avID 传入到 id 上了 https://github.com/siyuan-note/siyuan/issues/12724
|
||||||
|
const avID = operation.action === "setAttrViewName" ? operation.id : operation.avID
|
||||||
|
Array.from(protyle.wysiwyg.element.querySelectorAll(`[data-av-id="${avID}"]`)).forEach((item: HTMLElement) => {
|
||||||
item.removeAttribute("data-render");
|
item.removeAttribute("data-render");
|
||||||
const updateRow = item.querySelector('.av__row[data-need-update="true"]');
|
const updateRow = item.querySelector('.av__row[data-need-update="true"]');
|
||||||
if (operation.action === "sortAttrViewCol" || operation.action === "sortAttrViewRow") {
|
if (operation.action === "sortAttrViewCol" || operation.action === "sortAttrViewRow") {
|
||||||
|
|
@ -444,7 +446,7 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
|
||||||
addDragFill(item.querySelector(".av__cell--select"));
|
addDragFill(item.querySelector(".av__cell--select"));
|
||||||
}
|
}
|
||||||
avRender(item, protyle, () => {
|
avRender(item, protyle, () => {
|
||||||
const attrElement = document.querySelector(`.b3-dialog--open[data-key="${Constants.DIALOG_ATTR}"] div[data-av-id="${operation.avID}"]`) as HTMLElement;
|
const attrElement = document.querySelector(`.b3-dialog--open[data-key="${Constants.DIALOG_ATTR}"] div[data-av-id="${avID}"]`) as HTMLElement;
|
||||||
if (attrElement) {
|
if (attrElement) {
|
||||||
// 更新属性面板
|
// 更新属性面板
|
||||||
renderAVAttribute(attrElement.parentElement, attrElement.dataset.nodeId, protyle);
|
renderAVAttribute(attrElement.parentElement, attrElement.dataset.nodeId, protyle);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue