fix: restore horizontal slide loading placeholders

Wrap VirtualSlideView loading content in a horizontal track so media and person slide skeletons keep their original full-width carousel layout and title presentation during loading.
This commit is contained in:
jxxghp
2026-05-09 09:02:09 +08:00
parent 876a46607b
commit ef62bd6e98

View File

@@ -214,7 +214,9 @@ watch(
<div class="slider-content-container">
<div ref="slideContentRef" class="slider-content" tabindex="0" @scroll="handleContentScroll">
<template v-if="loading">
<slot name="loading" />
<div class="loading-track" :style="{ gap: `${itemGap}px` }">
<slot name="loading" />
</div>
</template>
<template v-else-if="items.length > 0">
<div class="virtual-track" :style="{ width: `${totalContentWidth}px` }">
@@ -356,8 +358,15 @@ watch(
inline-size: max-content;
}
.loading-track {
display: flex;
inline-size: max-content;
min-inline-size: 100%;
}
.virtual-slide-item,
.virtual-spacer {
.virtual-spacer,
.loading-track > * {
flex: 0 0 auto;
}