0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-12 22:45:06 +00:00
VueTube/NUXT/pages/playlist.vue
2023-04-24 19:59:53 +12:00

30 lines
652 B
Vue

<template>
<div>
<playlist-video-card
v-for="(video, index) in playlist.videos"
:key="index"
:video="video"
@deleted="deletePlaylistVideo(video)"
/>
</div>
</template>
<script>
import playlistVideoCard from "~/components/Playlist/playlistVideoCard.vue";
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>