mirror of
https://github.com/VueTubeApp/VueTube
synced 2024-11-25 04:35:17 +00:00
30 lines
652 B
Vue
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>
|