Hand player update
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user