2023-04-17 22:17:23 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<playlist-video-card
|
|
|
|
v-for="(video, index) in playlist.videos"
|
|
|
|
:key="index"
|
|
|
|
:video="video"
|
|
|
|
@deleted="deletePlaylistVideo(video)"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-04-24 07:59:53 +00:00
|
|
|
import playlistVideoCard from "~/components/Playlist/playlistVideoCard.vue";
|
2023-04-17 22:17:23 +00:00
|
|
|
export default {
|
|
|
|
components: { playlistVideoCard },
|
|
|
|
computed: {
|
|
|
|
playlist() {
|
|
|
|
return this.$store.state.playlist.currentPlaylist;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
deletePlaylistVideo(target) {
|
|
|
|
this.$store.commit("playlist/removeFromPlaylist", {
|
|
|
|
playlistIndex: this.playlist.index,
|
|
|
|
video: target,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|