File tree 1 file changed +22
-13
lines changed
1 file changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -5,21 +5,30 @@ export default {
5
5
name: ' CDropdownItem' ,
6
6
props: propsFactory (),
7
7
render (h ) {
8
+ const data = {
9
+ props: this ._props ,
10
+ staticClass: ' dropdown-item' ,
11
+ attrs: { role: ' menuitem' },
12
+ on: {
13
+ // listeners added, due to component was previously functional for compatibility
14
+ ... this .$listeners ,
15
+ click : (e ) => {
16
+ this .$parent .$emit (' dropdown-close' )
17
+ this .$emit (' click' , e)
18
+ }
19
+ }
20
+ }
21
+ if (this .to ) {
22
+ data .nativeOn = {
23
+ click : (e ) => {
24
+ this .$parent .$emit (' dropdown-close' )
25
+ this .$emit (' click' , e)
26
+ }
27
+ }
28
+ }
8
29
return h (
9
30
CLink,
10
- {
11
- props: this ._props ,
12
- staticClass: ' dropdown-item' ,
13
- attrs: { role: ' menuitem' },
14
- on: {
15
- // listeners added, due to component was previously functional for compatibility
16
- ... this .$listeners ,
17
- click : (e ) => {
18
- this .$parent .$emit (' dropdown-close' )
19
- this .$emit (' click' , e)
20
- }
21
- }
22
- },
31
+ data,
23
32
this .$slots .default
24
33
)
25
34
}
You can’t perform that action at this time.
0 commit comments