forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExpandable.vue
More file actions
61 lines (53 loc) · 1.61 KB
/
Expandable.vue
File metadata and controls
61 lines (53 loc) · 1.61 KB
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<template>
<div class="q-pa-md row items-start q-gutter-md">
<q-card class="my-card" flat bordered>
<q-img
src="https://cdn.quasar.dev/img/parallax2.jpg"
/>
<q-card-section>
<div class="text-overline text-orange-9">Overline</div>
<div class="text-h5 q-mt-sm q-mb-xs">Title</div>
<div class="text-caption text-grey">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
</div>
</q-card-section>
<q-card-actions>
<q-btn flat color="dark" label="Share" />
<q-btn flat color="primary" label="Book" />
<q-space />
<q-btn
color="grey"
round
flat
dense
:icon="expanded ? 'keyboard_arrow_up' : 'keyboard_arrow_down'"
@click="expanded = !expanded"
/>
</q-card-actions>
<q-slide-transition>
<div v-show="expanded">
<q-separator />
<q-card-section class="text-subitle2">
{{ lorem }}
</q-card-section>
</div>
</q-slide-transition>
</q-card>
</div>
</template>
<script>
import { ref } from 'vue'
export default {
setup () {
return {
expanded: ref(false),
lorem: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.'
}
}
}
</script>
<style lang="sass" scoped>
.my-card
width: 100%
max-width: 350px
</style>