mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 23:22:02 +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' : ''
|
(isAbsoluteUrl.value || hasTarget.value) ? 'noopener noreferrer' : ''
|
||||||
) || null
|
) || null
|
||||||
|
|
||||||
const navigate = () => navigateTo(href, { replace: props.replace })
|
|
||||||
|
|
||||||
// https://router.vuejs.org/api/#custom
|
// https://router.vuejs.org/api/#custom
|
||||||
if (props.custom) {
|
if (props.custom) {
|
||||||
if (!slots.default) {
|
if (!slots.default) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const navigate = () => navigateTo(href, { replace: props.replace, external: props.external })
|
||||||
|
|
||||||
return slots.default({
|
return slots.default({
|
||||||
href,
|
href,
|
||||||
navigate,
|
navigate,
|
||||||
|
Loading…
Reference in New Issue
Block a user