- Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDropdownMenu.vue
56 lines (53 loc) · 908 Bytes
/
DropdownMenu.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<template>
<component:is="tag"data-toggle="dropdown-menu":class="className"
><slot></slot
></component>
</template>
<script>
constDropdownMenu= {
props: {
tag: {
type:String,
default:"div"
},
dropup: {
type:Boolean,
default:false
},
right: {
type:Boolean,
default:false
},
dropright: {
type:Boolean,
default:false
},
dropleft: {
type:Boolean,
default:false
},
color: {
type:String
}
},
computed: {
className() {
return [
"dropdown-menu",
"show",
this.color?"dropdown-"+this.color:""
];
}
}
};
exportdefaultDropdownMenu;
export { DropdownMenuasmdbDropdownMenu };
</script>
<style>
.navbar.dropdown-menu {
position: relative!important;
}
.navbar.mega-menu {
position: absolute!important;
}
</style>