forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRoot.vue
More file actions
43 lines (38 loc) · 918 Bytes
/
Root.vue
File metadata and controls
43 lines (38 loc) · 918 Bytes
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
39
40
41
42
43
<template>
<div class="q-pa-md">
<div ref="myListRef" class="row justify-center q-gutter-sm">
<q-intersection
v-for="index in 60"
:key="index"
:root="listEl"
transition="scale"
class="example-item"
>
<q-card class="q-ma-sm">
<img src="https://cdn.quasar.dev/img/mountains.jpg">
<q-card-section>
<div class="text-h6">Card #{{ index }}</div>
<div class="text-subtitle2">by John Doe</div>
</q-card-section>
</q-card>
</q-intersection>
</div>
</div>
</template>
<script>
import { ref, computed } from 'vue'
export default {
setup () {
const myListRef = ref(null)
return {
myListRef,
listEl: computed(() => myListRef.value ? myListRef.value.$el : null)
}
}
}
</script>
<style lang="sass" scoped>
.example-item
height: 290px
width: 290px
</style>