| 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 | class: { |
| 10 | type: String, |
| 11 | }, |
| 12 | backgroundSize: { |
| 13 | type: String, |
| 14 | default: 'cover', |
| 15 | }, |
| 16 | }) |
| 17 | |
| 18 | const style = computed(() => handleBackground(props.image, false, props.backgroundSize)) |
| 19 | </script> |
| 20 | |
| 21 | <template> |
| 22 | <div class="grid grid-cols-2 w-full h-full auto-rows-fr"> |
| 23 | <div class="w-full h-full" :style="style" /> |
| 24 | <div class="slidev-layout default" :class="props.class"> |
| 25 | <slot /> |
| 26 | </div> |
| 27 | </div> |
| 28 | </template> |
| 29 |