mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 10:30:13 +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 {
|
||||
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[] = [];
|
||||
options.blockElement.querySelectorAll(".av__gallery-item--select").forEach(rowItem => {
|
||||
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-fields${view.wrapField ? " av__gallery-fields--wrap" : ""}">`;
|
||||
galleryHTML += `<div class="av__gallery-fields${editIds.includes(item.id) ? " av__gallery-fields--edit" : ""}${view.wrapField ? " av__gallery-fields--wrap" : ""}">`;
|
||||
item.values.forEach((cell, fieldsIndex) => {
|
||||
if (view.fields[fieldsIndex].hidden) {
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue