forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOptionSlot.vue
More file actions
77 lines (73 loc) · 1.71 KB
/
OptionSlot.vue
File metadata and controls
77 lines (73 loc) · 1.71 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
<template>
<div class="q-pa-md" style="max-width: 300px">
<div class="q-gutter-md">
<q-badge color="secondary" multi-line>
Model: "{{ model }}"
</q-badge>
<q-select
filled
v-model="model"
:options="options"
label="Standard"
color="teal"
clearable
options-selected-class="text-deep-orange"
>
<template v-slot:option="scope">
<q-item v-bind="scope.itemProps">
<q-item-section avatar>
<q-icon :name="scope.opt.icon" />
</q-item-section>
<q-item-section>
<q-item-label>{{ scope.opt.label }}</q-item-label>
<q-item-label caption>{{ scope.opt.description }}</q-item-label>
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</div>
</template>
<script>
import { ref } from 'vue'
export default {
setup () {
return {
model: ref(null),
options: [
{
label: 'Google',
value: 'Google',
description: 'Search engine',
icon: 'mail'
},
{
label: 'Facebook',
value: 'Facebook',
description: 'Social media',
icon: 'bluetooth'
},
{
label: 'Twitter',
value: 'Twitter',
description: 'Quick updates',
icon: 'map'
},
{
label: 'Apple',
value: 'Apple',
description: 'iStuff',
icon: 'golf_course'
},
{
label: 'Oracle',
value: 'Oracle',
disable: true,
description: 'Databases',
icon: 'casino'
}
]
}
}
}
</script>