File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,10 @@ const CLink = defineComponent({
3434 required : false ,
3535 } ,
3636 } ,
37- emits : [ 'onClick ' ] ,
37+ emits : [ 'click ' ] ,
3838 setup ( props , { slots, emit } ) {
39- const onClick = ( event : MouseEvent ) => {
40- event . preventDefault ( )
41- emit ( 'onClick' , props . href )
39+ const handleClick = ( ) => {
40+ emit ( 'click' , props . href )
4241 }
4342 return ( ) =>
4443 h (
@@ -47,7 +46,9 @@ const CLink = defineComponent({
4746 class : [ { active : props . active , disabled : props . disabled } ] ,
4847 ...( props . active && { 'aria-current' : 'page' } ) ,
4948 ...( props . component === 'a' && props . disabled && { 'aria-disabled' : true , tabIndex : - 1 } ) ,
50- ...( ( props . component === 'a' || props . component === 'button' ) && { onClick : onClick } ) ,
49+ ...( ( props . component === 'a' || props . component === 'button' ) && {
50+ onClick : handleClick ,
51+ } ) ,
5152 href : props . href ,
5253 } ,
5354 slots . default && slots . default ( ) ,
You can’t perform that action at this time.
0 commit comments