Hand player update

This commit is contained in:
2024-04-20 00:36:27 +02:00
parent 638895f0bc
commit 571bcd14d3
5 changed files with 37 additions and 9 deletions
+12 -2
View File
@@ -1,17 +1,27 @@
<script setup lang="ts">
const props = defineProps(['data'])
const props = defineProps({
data: {
type: String as PropType<string>,
required: false,
},
})
const cards = useState<{ [key: string]: any }>('cards')
function cardClick() {
if (!props.data) return
console.log(JSON.parse(JSON.stringify(cards.value[props.data].effects)))
}
</script>
<template>
<span @click="cardClick">
<span v-if="props.data" @click="cardClick">
{{ cards[props.data].name }}
</span>
<span v-if="!props.data">
HIDDEN
</span>
|
</template>