1
1
import { mergeData } from 'vue-functional-data-merge'
2
- // import pluckProps from '../../utils/pluck-props'
3
- import Link , { propsFactory as linkPropsFactory } from '../Link/CLink'
4
-
5
- let linkProps = linkPropsFactory ( )
6
- delete linkProps . href . default
7
- delete linkProps . to . default
2
+ import CLink , { props as linkProps } from '../Link/CLink'
8
3
9
4
export const props = Object . assign ( linkProps , {
10
5
tag : {
@@ -18,10 +13,6 @@ export const props = Object.assign(linkProps, {
18
13
pill : {
19
14
type : Boolean ,
20
15
default : false
21
- } ,
22
- additionalClasses : {
23
- type : String ,
24
- default : null
25
16
}
26
17
} )
27
18
@@ -30,7 +21,7 @@ export default {
30
21
name :'CBadge' ,
31
22
props,
32
23
render ( h , { props, data, children } ) {
33
- const tag = ! props . href && ! props . to ? props . tag : Link
24
+ const tag = ! props . href && ! props . to ? props . tag : CLink
34
25
const componentData = {
35
26
staticClass : 'badge' ,
36
27
class : [
@@ -39,13 +30,10 @@ export default {
39
30
'badge-pill' : Boolean ( props . pill ) ,
40
31
active : props . active ,
41
32
disabled : props . disabled
42
- } ,
43
- props . additionalClasses ? props . additionalClasses : ''
33
+ }
44
34
] ,
45
- // props: pluckProps(linkProps, props)
46
- props : props
35
+ props
47
36
}
48
-
49
37
return h ( tag , mergeData ( data , componentData ) , children )
50
38
}
51
39
}
0 commit comments