2022-01-13 04:52:14 +00:00
|
|
|
<template>
|
|
|
|
<h2 v-t="'video.chapters'" />
|
2022-01-26 04:39:36 +00:00
|
|
|
<div :key="chapter.start" v-for="chapter in props.chapters" @click="$emit('seek', chapter.start)" class="chapter">
|
2022-01-13 04:52:14 +00:00
|
|
|
<img :src="chapter.image" :alt="chapter.title" class="h-12" />
|
|
|
|
<div class="ml-1">
|
|
|
|
<span class="text-xl" v-text="chapter.title" />
|
|
|
|
<br />
|
|
|
|
<span class="text-sm" v-text="timeFormat(chapter.start)" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-01-26 04:39:36 +00:00
|
|
|
<style>
|
|
|
|
.chapter {
|
|
|
|
@apply flex items-center mb-2 cursor-pointer w-sm max-w-90vw;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
2022-01-13 04:52:14 +00:00
|
|
|
<script setup>
|
|
|
|
import { defineProps, defineEmits } from "vue";
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
chapters: Object,
|
|
|
|
});
|
|
|
|
|
|
|
|
defineEmits(["seek"]);
|
|
|
|
</script>
|