forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExampleContacts.vue
More file actions
91 lines (81 loc) · 2.14 KB
/
ExampleContacts.vue
File metadata and controls
91 lines (81 loc) · 2.14 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
<template>
<div class="q-pa-md" style="max-width: 350px">
<q-toolbar class="bg-primary text-white shadow-2">
<q-toolbar-title>Contacts</q-toolbar-title>
</q-toolbar>
<q-list bordered>
<q-item v-for="contact in contacts" :key="contact.id" class="q-my-sm" clickable v-ripple>
<q-item-section avatar>
<q-avatar color="primary" text-color="white">
{{ contact.letter }}
</q-avatar>
</q-item-section>
<q-item-section>
<q-item-label>{{ contact.name }}</q-item-label>
<q-item-label caption lines="1">{{ contact.email }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-icon name="chat_bubble" color="green" />
</q-item-section>
</q-item>
<q-separator />
<q-item-label header>Offline</q-item-label>
<q-item v-for="contact in offline" :key="contact.id" class="q-mb-sm" clickable v-ripple>
<q-item-section avatar>
<q-avatar>
<img :src="`https://cdn.quasar.dev/img/${contact.avatar}`">
</q-avatar>
</q-item-section>
<q-item-section>
<q-item-label>{{ contact.name }}</q-item-label>
<q-item-label caption lines="1">{{ contact.email }}</q-item-label>
</q-item-section>
<q-item-section side>
<q-icon name="chat_bubble" color="grey" />
</q-item-section>
</q-item>
</q-list>
</div>
</template>
<script>
const contacts = [{
id: 1,
name: 'Ruddy Jedrzej',
email: 'rjedrzej0@discuz.net',
letter: 'R'
}, {
id: 2,
name: 'Mallorie Alessandrini',
email: 'malessandrini1@marketwatch.com',
letter: 'M'
}, {
id: 3,
name: 'Elisabetta Wicklen',
email: 'ewicklen2@microsoft.com',
letter: 'E'
}, {
id: 4,
name: 'Seka Fawdrey',
email: 'sfawdrey3@wired.com',
letter: 'S'
}]
const offline = [{
id: 5,
name: 'Brunhilde Panswick',
email: 'bpanswick4@csmonitor.com',
avatar: 'avatar2.jpg'
}, {
id: 6,
name: 'Winfield Stapforth',
email: 'wstapforth5@pcworld.com',
avatar: 'avatar6.jpg'
}]
export default {
data () {
return {
contacts,
offline
}
}
}
</script>