SyntaxSquad/DADProject#15 feat: Initial Idea
This commit is contained in:
@@ -67,11 +67,13 @@ const props = defineProps({
|
||||
default: 'player',
|
||||
validator: (value) => ['player', 'opponent'].includes(value),
|
||||
},
|
||||
isMyTurn: { type: Boolean, default: false },
|
||||
})
|
||||
|
||||
const emit = defineEmits(['play-card'])
|
||||
|
||||
const handleCardClick = (payload) => {
|
||||
if (!props.isMyTurn) return
|
||||
emit('play-card', payload.card)
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user