返回 slidev
two-cols.vue
根目录 / packages / client / layouts / two-cols.vue
1 <!--
2 Usage:
3
4 ```md
5 ---
6 layout: two-cols
7 ---
8
9 # Left
10
11 This shows on the left
12
13 ::right::
14
15 # Right
16
17 This shows on the right
18 ```
19
20 -->
21
22 <script setup lang="ts">
23 const props = defineProps({
24 class: {
25 type: String,
26 },
27 layoutClass: {
28 type: String,
29 },
30 })
31 </script>
32
33 <template>
34 <div class="slidev-layout two-columns w-full h-full grid grid-cols-2" :class="props.layoutClass">
35 <div class="col-left" :class="props.class">
36 <slot />
37 <slot name="left" />
38 </div>
39 <div class="col-right" :class="props.class">
40 <slot name="right" />
41 </div>
42 </div>
43 </template>
44
44 lines Plain Text