-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
DropdownExamples.vue
35 lines (29 loc) · 1.07 KB
/
DropdownExamples.vue
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
<template>
<div>
<div class="mb-4 col-4">
<h2>Dropdown</h2>
<div class="dropdown">
<button v-vb-is:dropdown ref="exampleDropdown1"
@vb-shown-bs-dropdown="exampleDropdown1Shown"
class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
Dropdown button
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
</ul>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'DropdownExamples',
methods: {
exampleDropdown1Shown() {
console.log('example Dropdown 1 Shown', this.$refs.exampleDropdown1.$vb.dropdown);
}
}
}
</script>