Files
front/components/CardSlot.vue
T

32 lines
624 B
Vue

<script setup lang="ts">
export interface Props {
stack: string[]
}
const props = withDefaults(defineProps<Props>(), {
stack: () => [],
})
const wrapped = ref(false)
</script>
<template>
{{ props.stack?.length }}
<input type="checkbox" v-model="wrapped" />
<div class="cards_container">
<CardPreview v-if="!wrapped" :data="props.stack.at(-1)">
<slot></slot>
</CardPreview>
<template v-if="wrapped" v-for="c in props.stack">
<CardPreview :data="c">
<slot></slot>
</CardPreview>
</template>
</div>
</template>