-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreactive-layout.vue
38 lines (38 loc) · 1 KB
/
reactive-layout.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<template>
<window :init-pos="{ top: 512, left: 1024 }" name="响应式24栏栅格">
<reveal-container>
<fd-row>
<fd-col
v-for="block in blocks"
:key="block"
:span="{ xs:6 , md:5, xl: 4 }"
:offset="{ xs:0 , md: 1 , xl: 2 }"
>
<reveal>{{ block }}</reveal>
</fd-col>
</fd-row>
<fd-row>
<fd-col v-for="block in blocks" :key="block" :span="{ xs:8 , xl: 6 }">
<reveal :value="block">{{ block }}</reveal>
</fd-col>
</fd-row>
<fd-row>
<fd-col span="4" offset="3">hello</fd-col>
<fd-col span="4" offset="3">world</fd-col>
</fd-row>
</reveal-container>
</window>
</template>
<script lang="ts">
import { defineComponent, reactive } from 'vue'
import { createArray } from '@/util'
export default defineComponent({
name: 'App',
setup () {
const blocks = reactive(createArray(6, idx => String.fromCharCode(65 + idx)))
return {
blocks
}
}
})
</script>