23 lines
422 B
Vue
23 lines
422 B
Vue
<script setup lang="ts">
|
|
const props = defineProps(['data'])
|
|
const cards = useState<{ [key: string]: any }>('cards')
|
|
|
|
function cardClick() {
|
|
console.log(JSON.parse(JSON.stringify(cards.value[props.data].effects)))
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<span @click="cardClick">
|
|
{{ cards[props.data].name }}
|
|
</span>
|
|
|
|
|
|
|
</template>
|
|
|
|
<style scoped>
|
|
span {
|
|
border: 1px solid black;
|
|
cursor: pointer
|
|
}
|
|
</style> |