forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOverlayMode.vue
More file actions
99 lines (92 loc) · 2.21 KB
/
OverlayMode.vue
File metadata and controls
99 lines (92 loc) · 2.21 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<template>
<div class="q-pa-md">
<q-layout view="hHh Lpr lff" container style="height: 300px" class="shadow-2 rounded-borders">
<q-header elevated class="bg-black">
<q-toolbar>
<q-btn flat @click="drawer = !drawer" round dense icon="menu" />
<q-toolbar-title>Header</q-toolbar-title>
</q-toolbar>
</q-header>
<q-drawer
v-model="drawer"
:width="200"
:breakpoint="500"
overlay
bordered
class="bg-grey-3"
>
<q-scroll-area class="fit">
<q-list>
<template v-for="(menuItem, index) in menuList" :key="index">
<q-item clickable :active="menuItem.label === 'Outbox'" v-ripple>
<q-item-section avatar>
<q-icon :name="menuItem.icon" />
</q-item-section>
<q-item-section>
{{ menuItem.label }}
</q-item-section>
</q-item>
<q-separator :key="'sep' + index" v-if="menuItem.separator" />
</template>
</q-list>
</q-scroll-area>
</q-drawer>
<q-page-container>
<q-page padding>
<p v-for="n in 15" :key="n">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Fugit nihil praesentium molestias a adipisci, dolore vitae odit, quidem consequatur optio voluptates asperiores pariatur eos numquam rerum delectus commodi perferendis voluptate?
</p>
</q-page>
</q-page-container>
</q-layout>
</div>
</template>
<script>
import { ref } from 'vue'
const menuList = [
{
icon: 'inbox',
label: 'Inbox',
separator: true
},
{
icon: 'send',
label: 'Outbox',
separator: false
},
{
icon: 'delete',
label: 'Trash',
separator: false
},
{
icon: 'error',
label: 'Spam',
separator: true
},
{
icon: 'settings',
label: 'Settings',
separator: false
},
{
icon: 'feedback',
label: 'Send Feedback',
separator: false
},
{
icon: 'help',
iconColor: 'primary',
label: 'Help',
separator: false
}
]
export default {
setup () {
return {
drawer: ref(true),
menuList
}
}
}
</script>