| 1 | <script setup lang="ts"> |
| 2 | import { computed } from 'vue' |
| 3 | import { handleBackground } from '../layoutHelper' |
| 4 | |
| 5 | const props = defineProps({ |
| 6 | image: { |
| 7 | type: String, |
| 8 | }, |
| 9 | backgroundSize: { |
| 10 | type: String, |
| 11 | default: 'cover', |
| 12 | }, |
| 13 | }) |
| 14 | |
| 15 | const style = computed(() => handleBackground(props.image, false, props.backgroundSize)) |
| 16 | </script> |
| 17 | |
| 18 | <template> |
| 19 | <div class="slidev-layout w-full h-full" :style="style"> |
| 20 | <slot /> |
| 21 | </div> |
| 22 | </template> |
| 23 |