File tree Expand file tree Collapse file tree 1 file changed +23
-15
lines changed Expand file tree Collapse file tree 1 file changed +23
-15
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,28 @@ import CLink, { props as linkProps } from '../link/CLink'
25
25
import CBadge from ' ../badge/CBadge'
26
26
import CIcon from ' @coreui/icons-vue/CIcon.vue'
27
27
28
- const props = Object .assign ({}, linkProps, {
29
- name: String ,
30
- icon: [String , Object ],
31
- fontIcon: String ,
32
- badge: Object ,
33
- addLinkClasses: [String , Array , Object ],
34
- label: Boolean
35
- })
28
+ const props = Object .assign (
29
+ {},
30
+ linkProps,
31
+ {
32
+ exact: {
33
+ type: Boolean ,
34
+ default: true
35
+ },
36
+ activeClass: {
37
+ type: String ,
38
+ default: ' c-active'
39
+ }
40
+ },
41
+ {
42
+ name: String ,
43
+ icon: [String , Object ],
44
+ fontIcon: String ,
45
+ badge: Object ,
46
+ addLinkClasses: [String , Array , Object ],
47
+ label: Boolean
48
+ }
49
+ )
36
50
37
51
export default {
38
52
name: ' CSidebarNavItem' ,
@@ -43,18 +57,12 @@ export default {
43
57
},
44
58
props,
45
59
computed: {
46
- linkProps () {
60
+ computedLinkProps () {
47
61
return Object .keys (linkProps).reduce ((props , key ) => {
48
62
props[key] = this [key]
49
63
return props
50
64
}, {})
51
65
},
52
- addedLinkProps () {
53
- return this .$options .propsData .exact === undefined ? { exact: true } : {}
54
- },
55
- computedLinkProps () {
56
- return Object .assign (this .linkProps , this .addedLinkProps )
57
- },
58
66
linkClasses () {
59
67
return [
60
68
this .label ? ' c-sidebar-nav-label' : ' c-sidebar-nav-link' ,
You can’t perform that action at this time.
0 commit comments