Vanessa 2025-08-14 10:08:30 +08:00
parent b78616382b
commit f5468fead9
4 changed files with 12 additions and 2 deletions

View file

@ -19,6 +19,11 @@ export const insertGalleryItemAnimation = (options: {
if (hasSort) {
sideItemElement = options.blockElement.querySelector(groupQuery + ".av__gallery-add").previousElementSibling;
}
const bodyElement = options.blockElement.querySelector(`.av__body[data-group-id="${options.groupID}"] `);
if (bodyElement && ["updated", "created"].includes(bodyElement.getAttribute("data-dtype")) &&
bodyElement.getAttribute("data-content") !== "_@today@_") {
sideItemElement = options.blockElement.querySelector('.av__body[data-content="_@today@_"] .av__gallery-add').previousElementSibling;
}
let cellsHTML = "";
sideItemElement?.querySelectorAll(".av__cell").forEach((item: HTMLElement) => {
let lineNumber = 1;

View file

@ -132,7 +132,7 @@ const renderGroupGallery = (options: ITableOptions) => {
options.data.view.groups.forEach((group: IAVGallery) => {
if (group.groupHidden === 0) {
avBodyHTML += `${getGroupTitleHTML(group, group.cards.length)}
<div data-group-id="${group.id}" data-page-size="${group.pageSize}" class="av__body${group.groupFolded ? " fn__none" : ""}">${getGalleryHTML(group, options.resetData.selectItemIds, options.resetData.editIds, group.id)}</div>`;
<div data-group-id="${group.id}" data-page-size="${group.pageSize}" data-dtype="${group.groupKey.type}" data-content="${group.groupValue.text.content}" class="av__body${group.groupFolded ? " fn__none" : ""}">${getGalleryHTML(group, options.resetData.selectItemIds, options.resetData.editIds, group.id)}</div>`;
}
});
if (options.renderAll) {

View file

@ -261,7 +261,7 @@ const renderGroupTable = (options: ITableOptions) => {
options.data.view.groups.forEach((group: IAVTable) => {
if (group.groupHidden === 0) {
avBodyHTML += `${getGroupTitleHTML(group, group.rows.length)}
<div data-group-id="${group.id}" data-page-size="${group.pageSize}" style="float: left" class="av__body${group.groupFolded ? " fn__none" : ""}">${getTableHTMLs(group, options.blockElement)}</div>`;
<div data-group-id="${group.id}" data-page-size="${group.pageSize}" data-dtype="${group.groupKey.type}" data-content="${group.groupValue.text.content}" style="float: left" class="av__body${group.groupFolded ? " fn__none" : ""}">${getTableHTMLs(group, options.blockElement)}</div>`;
}
});
if (options.renderAll) {

View file

@ -128,6 +128,11 @@ export const insertAttrViewBlockAnimation = (options: {
if (hasSort) {
previousElement = options.blockElement.querySelector(groupQuery + ".av__row--util").previousElementSibling;
}
const bodyElement = options.blockElement.querySelector(`.av__body[data-group-id="${options.groupID}"] `);
if (bodyElement && ["updated", "created"].includes(bodyElement.getAttribute("data-dtype")) &&
bodyElement.getAttribute("data-content") !== "_@today@_") {
previousElement = options.blockElement.querySelector('.av__body[data-content="_@today@_"] .av__row--util').previousElementSibling;
}
let cellsHTML = '<div class="av__colsticky"><div class="av__firstcol"><svg><use xlink:href="#iconUncheck"></use></svg></div></div>';
const pinIndex = previousElement.querySelectorAll(".av__colsticky .av__cell").length - 1;