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'
2525import CBadge from ' ../badge/CBadge'
2626import CIcon from ' @coreui/icons-vue/CIcon.vue'
2727
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+ )
3650
3751export default {
3852 name: ' CSidebarNavItem' ,
@@ -43,18 +57,12 @@ export default {
4357 },
4458 props,
4559 computed: {
46- linkProps () {
60+ computedLinkProps () {
4761 return Object .keys (linkProps).reduce ((props , key ) => {
4862 props[key] = this [key]
4963 return props
5064 }, {})
5165 },
52- addedLinkProps () {
53- return this .$options .propsData .exact === undefined ? { exact: true } : {}
54- },
55- computedLinkProps () {
56- return Object .assign (this .linkProps , this .addedLinkProps )
57- },
5866 linkClasses () {
5967 return [
6068 this .label ? ' c-sidebar-nav-label' : ' c-sidebar-nav-link' ,
You can’t perform that action at this time.
0 commit comments