fix scroll to
This commit is contained in:
parent
440944b310
commit
6b21e28641
@ -97,7 +97,7 @@
|
||||
>
|
||||
<span class="loading loading-spinner loading-lg" />
|
||||
</div>
|
||||
<div class="h-full overflow-auto">
|
||||
<div id="scroll-container" class="h-full overflow-auto">
|
||||
<Sortable
|
||||
:list="playlistStore.playlist"
|
||||
item-key="uid"
|
||||
@ -750,23 +750,27 @@ const template = ref({
|
||||
sources: [],
|
||||
} as Template)
|
||||
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
if (!mediaStore.folderTree.parent) {
|
||||
mediaStore.getTree('')
|
||||
await mediaStore.getTree('')
|
||||
}
|
||||
|
||||
getPlaylist()
|
||||
})
|
||||
|
||||
watch([listDate, configID], () => {
|
||||
watch([listDate, configID], async () => {
|
||||
mediaStore.getTree('')
|
||||
getPlaylist()
|
||||
await getPlaylist()
|
||||
})
|
||||
|
||||
function scrollTo(index: number) {
|
||||
const child = document.getElementById(`clip_${index}`)
|
||||
const parent = document.getElementById('scroll-container')
|
||||
|
||||
console.log('scroll')
|
||||
console.log('child', child)
|
||||
console.log('parent', parent)
|
||||
|
||||
if (child && parent) {
|
||||
const topPos = child.offsetTop
|
||||
parent.scrollTop = topPos - 50
|
||||
@ -1205,11 +1209,6 @@ function addTemplate() {
|
||||
height: calc(100% - 39px);
|
||||
}
|
||||
|
||||
#scroll-container {
|
||||
height: calc(100% - 40px);
|
||||
overflow: auto;
|
||||
scrollbar-width: medium;
|
||||
}
|
||||
.active-playlist-clip {
|
||||
background-color: #565e6a !important;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user