mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-09 14:12:34 +01:00
This commit is contained in:
parent
0aeb0bfea8
commit
a9ae243baf
1 changed files with 5 additions and 3 deletions
|
|
@ -29,7 +29,10 @@ export const renderGallery = (options: {
|
||||||
} else {
|
} else {
|
||||||
oldOffset = options.protyle.contentElement.scrollTop;
|
oldOffset = options.protyle.contentElement.scrollTop;
|
||||||
}
|
}
|
||||||
|
const editIds: string[] = [];
|
||||||
|
options.blockElement.querySelectorAll(".av__gallery-fields--edit").forEach(item => {
|
||||||
|
editIds.push(item.parentElement.getAttribute("data-id"));
|
||||||
|
});
|
||||||
const selectItemIds: string[] = [];
|
const selectItemIds: string[] = [];
|
||||||
options.blockElement.querySelectorAll(".av__gallery-item--select").forEach(rowItem => {
|
options.blockElement.querySelectorAll(".av__gallery-item--select").forEach(rowItem => {
|
||||||
const rowId = rowItem.getAttribute("data-id");
|
const rowId = rowItem.getAttribute("data-id");
|
||||||
|
|
@ -85,8 +88,7 @@ export const renderGallery = (options: {
|
||||||
galleryHTML += '<div class="av__gallery-cover"></div>';
|
galleryHTML += '<div class="av__gallery-cover"></div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
galleryHTML += `<div class="av__gallery-fields${editIds.includes(item.id) ? " av__gallery-fields--edit" : ""}${view.wrapField ? " av__gallery-fields--wrap" : ""}">`;
|
||||||
galleryHTML += `<div class="av__gallery-fields${view.wrapField ? " av__gallery-fields--wrap" : ""}">`;
|
|
||||||
item.values.forEach((cell, fieldsIndex) => {
|
item.values.forEach((cell, fieldsIndex) => {
|
||||||
if (view.fields[fieldsIndex].hidden) {
|
if (view.fields[fieldsIndex].hidden) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue