@@ -16,7 +16,6 @@ import { RouteLocationRaw, VueUseOptions, RouteLocation } from './types'
16
16
import { isSameRouteLocationParams , isSameRouteRecord } from './location'
17
17
import { routerKey , routeLocationKey } from './injectionSymbols'
18
18
import { RouteRecord } from './matcher/types'
19
- import { assign } from './utils'
20
19
import { NavigationFailure } from './errors'
21
20
22
21
export interface RouterLinkOptions {
@@ -145,7 +144,7 @@ export const RouterLinkImpl = /*#__PURE__*/ defineComponent({
145
144
} ,
146
145
} ,
147
146
148
- setup ( props , { slots, attrs } ) {
147
+ setup ( props , { slots } ) {
149
148
const link = reactive ( useLink ( props ) )
150
149
const { options } = inject ( routerKey ) !
151
150
@@ -192,19 +191,16 @@ export const RouterLinkImpl = /*#__PURE__*/ defineComponent({
192
191
? children
193
192
: h (
194
193
'a' ,
195
- assign (
196
- {
197
- 'aria-current' : link . isExactActive
198
- ? props . ariaCurrentValue
199
- : null ,
200
- onClick : link . navigate ,
201
- href : link . href ,
202
- } ,
203
- attrs ,
204
- {
205
- class : elClass . value ,
206
- }
207
- ) ,
194
+ {
195
+ 'aria-current' : link . isExactActive
196
+ ? props . ariaCurrentValue
197
+ : null ,
198
+ href : link . href ,
199
+ // this would override user added attrs but Vue will still add
200
+ // the listener so we end up triggering both
201
+ onClick : link . navigate ,
202
+ class : elClass . value ,
203
+ } ,
208
204
children
209
205
)
210
206
}
0 commit comments