Fix eslint config and apply all fixes.

This commit is contained in:
Kavin
2023-07-27 12:46:05 +01:00
parent 6c05f63bef
commit 301877e2e1
35 changed files with 308 additions and 285 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="overflow-x-scroll h-screen-sm" ref="scrollable">
<div ref="scrollable" class="overflow-x-scroll h-screen-sm">
<VideoItem
v-for="(related, index) in playlist.relatedStreams"
:key="related.url"
@@ -28,6 +28,18 @@ export default {
},
selectedIndex: {
type: Number,
required: true,
},
},
watch: {
playlist: {
handler() {
if (this.selectedIndex - 1 < this.playlist.relatedStreams.length)
nextTick(() => {
this.updateScroll();
});
},
deep: true,
},
},
mounted() {
@@ -43,16 +55,5 @@ export default {
elems[this.selectedIndex - 1].offsetTop - this.$refs.scrollable.offsetTop;
},
},
watch: {
playlist: {
handler() {
if (this.selectedIndex - 1 < this.playlist.relatedStreams.length)
nextTick(() => {
this.updateScroll();
});
},
deep: true,
},
},
};
</script>