mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(nuxt): pass external
to navigate
in custom <NuxtLink>
(#25887)
This commit is contained in:
parent
7213b2ddac
commit
f2d891cae9
@ -354,14 +354,14 @@ export function defineNuxtLink (options: NuxtLinkOptions) {
|
||||
(isAbsoluteUrl.value || hasTarget.value) ? 'noopener noreferrer' : ''
|
||||
) || null
|
||||
|
||||
const navigate = () => navigateTo(href, { replace: props.replace })
|
||||
|
||||
// https://router.vuejs.org/api/#custom
|
||||
if (props.custom) {
|
||||
if (!slots.default) {
|
||||
return null
|
||||
}
|
||||
|
||||
const navigate = () => navigateTo(href, { replace: props.replace, external: props.external })
|
||||
|
||||
return slots.default({
|
||||
href,
|
||||
navigate,
|
||||
|
Loading…
Reference in New Issue
Block a user