forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBasic.vue
More file actions
35 lines (33 loc) · 941 Bytes
/
Basic.vue
File metadata and controls
35 lines (33 loc) · 941 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
<template>
<div class="q-pa-md">
<q-infinite-scroll @load="onLoad" :offset="250">
<div v-for="(item, index) in items" :key="index" class="caption">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Rerum repellendus sit voluptate voluptas eveniet porro. Rerum blanditiis perferendis totam, ea at omnis vel numquam exercitationem aut, natus minima, porro labore.</p>
</div>
<template v-slot:loading>
<div class="row justify-center q-my-md">
<q-spinner-dots color="primary" size="40px" />
</div>
</template>
</q-infinite-scroll>
</div>
</template>
<script>
export default {
data () {
return {
items: [{}, {}, {}, {}, {}, {}, {}]
}
},
methods: {
onLoad (index, done) {
setTimeout(() => {
if (this.items) {
this.items.push({}, {}, {}, {}, {}, {}, {})
done()
}
}, 2000)
}
}
}
</script>