WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 1a7eb88

Browse files
committed
feat(docs): add arrow-container slot example #16955
1 parent 2b9cf83 commit 1a7eb88

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<template>
2+
<div class="q-pa-md">
3+
<q-btn-dropdown
4+
split
5+
label="Dropdown Button"
6+
color="cyan"
7+
push
8+
no-caps
9+
@click="onMainClick"
10+
>
11+
<template v-slot:arrow-container>
12+
<q-icon name="change_history" />
13+
</template>
14+
15+
<q-list>
16+
<q-item clickable v-close-popup @click="onItemClick">
17+
<q-item-section avatar>
18+
<q-avatar icon="folder" color="primary" text-color="white" />
19+
</q-item-section>
20+
<q-item-section>
21+
<q-item-label>Photos</q-item-label>
22+
<q-item-label caption>February 22, 2016</q-item-label>
23+
</q-item-section>
24+
<q-item-section side>
25+
<q-icon name="info" color="amber" />
26+
</q-item-section>
27+
</q-item>
28+
29+
<q-item clickable v-close-popup @click="onItemClick">
30+
<q-item-section avatar>
31+
<q-avatar icon="assignment" color="secondary" text-color="white" />
32+
</q-item-section>
33+
<q-item-section>
34+
<q-item-label>Vacation</q-item-label>
35+
<q-item-label caption>February 22, 2016</q-item-label>
36+
</q-item-section>
37+
<q-item-section side>
38+
<q-icon name="info" color="amber" />
39+
</q-item-section>
40+
</q-item>
41+
</q-list>
42+
</q-btn-dropdown>
43+
</div>
44+
</template>
45+
46+
<script>
47+
export default {
48+
setup () {
49+
return {
50+
onMainClick () {
51+
// console.log('Clicked on main button')
52+
},
53+
54+
onItemClick () {
55+
// console.log('Clicked on an Item')
56+
}
57+
}
58+
}
59+
}
60+
</script>

docs/src/pages/vue-components/button-dropdown.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ In case you are looking for a dropdown "input" instead of "button" use [Select](
2727

2828
<DocExample title="Label slot" file="LabelSlot" />
2929

30+
<DocExample title="Arrow container slot" file="ArrowContainerSlot" />
31+
3032
<DocExample title="Using v-model" file="Model" />
3133

3234
<DocExample title="Disable" file="Disable" />

0 commit comments

Comments
 (0)