Vanessa 2025-07-10 09:47:20 +08:00
parent 3a1803c8da
commit d61fbd83c6
2 changed files with 11 additions and 7 deletions

View file

@ -546,18 +546,22 @@ export const refreshAV = (protyle: IProtyle, operation: IOperation) => {
item.querySelector(".av__drag-fill")?.remove();
});
addDragFill(item.querySelector(".av__cell--select"));
}
if (operation.action === "setAttrViewBlockView") {
} else if (operation.action === "setAttrViewBlockView") {
const viewTabElement = item.querySelector(`.av__views > .layout-tab-bar > .item[data-id="${operation.id}"]`) as HTMLElement;
if (viewTabElement) {
item.dataset.pageSize = viewTabElement.dataset.page;
}
}
if (operation.action === "addAttrViewView") {
} else if (operation.action === "addAttrViewView") {
item.dataset.pageSize = "50";
}
if (operation.action === "removeAttrViewView") {
} else if (operation.action === "removeAttrViewView") {
item.dataset.pageSize = item.querySelector(`.av__views > .layout-tab-bar .item[data-id="${item.getAttribute(Constants.CUSTOM_SY_AV_VIEW)}"]`)?.getAttribute("data-page");
} else if (operation.action === "sortAttrViewView" && operation.data === "unRefresh") {
const viewTabElement = item.querySelector(`.av__views > .layout-tab-bar > .item[data-id="${operation.id}"]`) as HTMLElement;
if (viewTabElement && !operation.previousID && !viewTabElement.previousElementSibling) {
return;
} else if (viewTabElement && operation.previousID && viewTabElement.previousElementSibling?.getAttribute("data-id") === operation.previousID) {
return;
}
}
avRender(item, protyle, () => {
const attrElement = document.querySelector(`.b3-dialog--open[data-key="${Constants.DIALOG_ATTR}"] div[data-av-id="${avID}"]`) as HTMLElement;