nav.vue
992 Bytes
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
<template>
<component :is="type" :class="classObject">
<slot></slot>
</component>
</template>
<script>
export default {
computed: {
classObject() {
return {
nav: true,
'navbar-nav': this.isNavBar,
'nav-tabs': this.tabs,
'nav-pills': this.pills,
'flex-column': this.vertical,
'nav-fill': this.fill
};
}
},
props: {
type: {
type: String,
default: 'ul'
},
fill: {
type: Boolean,
default: false
},
tabs: {
type: Boolean,
default: false
},
pills: {
type: Boolean,
default: false
},
vertical: {
type: Boolean,
default: false
},
isNavBar: {
type: Boolean,
default: false
}
}
};
</script>