Fix scrollToIndex
This commit is contained in:
parent
d1b8190dca
commit
fa68ff76d8
|
@ -85,9 +85,10 @@ const scrollToCurrent = (behavior: ScrollBehavior = 'smooth') => {
|
|||
watchDebounced(currentTrack, () => scrollToCurrent(), { debounce: 100 })
|
||||
whenever(
|
||||
() => store.state.ui.queueFocused,
|
||||
() => {
|
||||
async () => {
|
||||
list.value?.scrollToIndex(currentIndex.value)
|
||||
setTimeout(() => scrollToCurrent('auto'), 1)
|
||||
await nextTick()
|
||||
requestAnimationFrame(() => scrollToCurrent('auto'))
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -156,6 +156,7 @@ const { resume, pause } = useRafFn(() => {
|
|||
}, { immediate: false })
|
||||
|
||||
const virtualList = ref()
|
||||
window.vl = virtualList
|
||||
defineExpose({
|
||||
scrollToIndex: (index: number) => virtualList.value?.scrollToItem(index),
|
||||
cleanup
|
||||
|
|
|
@ -344,7 +344,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.drag-container:not(.dragging) .queue-item:hover {
|
||||
.drag-container:not(.dragging) .hover .queue-item {
|
||||
background: rgba(0,0,0,.05);
|
||||
color: #000000f2;
|
||||
}
|
Loading…
Reference in New Issue