localhost-front/src/components/voteboard/voteCardList.vue

56 lines
1.1 KiB
Vue

<template>
<div>
<card
@addContents="addContents"
@checkedNames="checkedNames"
@endVoteId="endVoteId"
@voteEnded="voteEnded"
@voteDelete="voteDelete"
@randomList="randomList"
@updateVote="updateVote"
v-for="(item, index) in data"
:key="index"
:data="item"
/>
</div>
</template>
<script setup>
import card from '@c/voteboard/voteCard.vue'
const props = defineProps({
data: {
type: Array,
required: true,
},
});
const emit = defineEmits(['addContents','checkedNames','endVoteId','voteEnded','voteDelete','randomList']);
const addContents = (itemList ,voteId) =>{
emit('addContents',itemList ,voteId);
}
const checkedNames = (numList) =>{
emit('checkedNames',numList);
}
const endVoteId = (VoteId) =>{
emit('endVoteId',VoteId);
}
const voteEnded = (id) =>{
emit('voteEnded',id);
}
const voteDelete = (id) =>{
emit('voteDelete',id);
}
const updateVote = (id) =>{
emit('updateVote',id);
}
const randomList = (randomList , id) =>{
emit('randomList',randomList,id);
}
</script>
<style scoped>
</style>