Skip to content

Commit 0238c60

Browse files
committed
fix(scroll): parametrize overscroll
1 parent 0ffb8ae commit 0238c60

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/components/common/list/ListScroll.vue

+9-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ const props = defineProps({
5656
type: Boolean,
5757
required: false,
5858
},
59+
overscroll: {
60+
type: String as PropType<
61+
'auto' | 'contain' | 'none' | 'initial' | 'unset' | 'inherit'
62+
>,
63+
required: false,
64+
default: 'auto',
65+
},
5966
contentHeight: {
6067
type: Number,
6168
required: false,
@@ -179,6 +186,7 @@ const showPoster = computed(() => !hidePoster?.value && !isTiny.value);
179186
v-if="!isEmpty"
180187
ref="listRef"
181188
class="list-scroll"
189+
:style="{ '--overscroll-behavior': overscroll }"
182190
:data-length="items.length"
183191
:data-page-size="pageSize"
184192
:item-size="listItemSize"
@@ -270,7 +278,7 @@ const showPoster = computed(() => !hidePoster?.value && !isTiny.value);
270278
}
271279
272280
:deep(.v-vl) {
273-
overscroll-behavior: none;
281+
overscroll-behavior: var(--overscroll-behavior, auto);
274282
}
275283
}
276284
</style>

src/components/views/calendar/CalendarComponent.vue

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ const { onItemClick } = usePanelItem();
7171
backdrop
7272
show-played
7373
show-collected
74+
overscroll="none"
7475
:scroll-into-view="centerItem?.id ? [centerItem?.id] : []"
7576
@on-item-click="onItemClick"
7677
@on-scroll-into-view="e => onScrollIntoOutOfView(false, e.ref)"

src/components/views/releases/ReleasesComponent.vue

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ const onMovieClick = async ({ item }: { item: ListScrollItem }) => {
7070
:loading="loading"
7171
:content-height="3"
7272
hide-time
73+
overscroll="none"
7374
:scroll-into-view="centerItem?.id ? [centerItem?.id] : []"
7475
@on-item-click="onMovieClick"
7576
@on-scroll-into-view="e => onScrollIntoOutOfView(false, e.ref)"

0 commit comments

Comments
 (0)