mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-26 10:16:10 +01:00
This commit is contained in:
parent
f62de94887
commit
7fdd85dda2
5 changed files with 133 additions and 10 deletions
|
|
@ -26,9 +26,10 @@ export const insertGalleryItemAnimation = (options: {
|
|||
!options.blockElement.querySelector('[data-type="av-load-more"]').classList.contains("fn__none")) {
|
||||
needUpdate = ' data-need-update="true"';
|
||||
}
|
||||
const coverClass = sideItemElement.querySelector(".av__gallery-cover").className;
|
||||
options.srcIDs.forEach((id) => {
|
||||
html += `<div class="av__gallery-item"${needUpdate} data-type="ghost" data-id="${id}">
|
||||
<div class="av__gallery-cover"><span style="width: 100%;height: 100%;border-radius: var(--b3-border-radius) var(--b3-border-radius) 0 0;" class="av__pulse"></span></div>
|
||||
<div class="${coverClass}"><span style="width: 100%;height: 100%;border-radius: var(--b3-border-radius) var(--b3-border-radius) 0 0;" class="av__pulse"></span></div>
|
||||
<div class="av__gallery-fields"><span class="av__pulse"></span></div>
|
||||
</div>`;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ export const renderGallery = (options: {
|
|||
let galleryHTML = "";
|
||||
// body
|
||||
view.cards.forEach((item: IAVGalleryItem, rowIndex: number) => {
|
||||
galleryHTML += `<div data-id="${item.id}" class="av__gallery-item${selectItemIds.includes(item.id) ? " av__gallery-item--select" : ""}">`;
|
||||
galleryHTML += `<div data-id="${item.id}" draggable="true" class="av__gallery-item${selectItemIds.includes(item.id) ? " av__gallery-item--select" : ""}">`;
|
||||
if (view.coverFrom !== 0) {
|
||||
const coverClass= "av__gallery-cover av__gallery-cover--" + view.cardAspectRatio
|
||||
if (item.coverURL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue