diff --git a/src/runtime/components/Link.vue b/src/runtime/components/Link.vue index 60d61c017a..996e8fb09e 100644 --- a/src/runtime/components/Link.vue +++ b/src/runtime/components/Link.vue @@ -108,9 +108,10 @@ interface NuxtLinkDefaultSlotProps { diff --git a/src/runtime/vue/overrides/inertia/Link.vue b/src/runtime/vue/overrides/inertia/Link.vue index f826f824f3..5ffa40dc52 100644 --- a/src/runtime/vue/overrides/inertia/Link.vue +++ b/src/runtime/vue/overrides/inertia/Link.vue @@ -71,7 +71,7 @@ export interface LinkSlots { diff --git a/test/components/Link.spec.ts b/test/components/Link.spec.ts index 7793110f73..68626e51fe 100644 --- a/test/components/Link.spec.ts +++ b/test/components/Link.spec.ts @@ -17,6 +17,10 @@ describe('Link', () => { ['with raw activeClass', { props: { raw: true, active: true, activeClass: 'text-highlighted' } }], ['with raw inactiveClass', { props: { raw: true, active: false, inactiveClass: 'hover:text-primary' } }], ['with class', { props: { class: 'font-medium' } }], + ['with external to', { props: { to: 'https://example.com' } }], + ['with external to and target', { props: { to: 'https://example.com', target: '_blank' } }], + ['with internal to and target', { props: { to: '/about', target: '_blank' } }], + ['with external prop', { props: { to: '/api/download', external: true } }], // Slots ['with default slot', { slots: { default: () => 'Default slot' } }] ]) diff --git a/test/components/__snapshots__/Link-vue.spec.ts.snap b/test/components/__snapshots__/Link-vue.spec.ts.snap index a511e6bd8e..6b5ba15f9f 100644 --- a/test/components/__snapshots__/Link-vue.spec.ts.snap +++ b/test/components/__snapshots__/Link-vue.spec.ts.snap @@ -10,8 +10,16 @@ exports[`Link > renders with default slot correctly 1`] = `""`; +exports[`Link > renders with external prop correctly 1`] = `""`; + +exports[`Link > renders with external to and target correctly 1`] = `""`; + +exports[`Link > renders with external to correctly 1`] = `""`; + exports[`Link > renders with inactiveClass correctly 1`] = `""`; +exports[`Link > renders with internal to and target correctly 1`] = `""`; + exports[`Link > renders with raw activeClass correctly 1`] = `""`; exports[`Link > renders with raw correctly 1`] = `""`; diff --git a/test/components/__snapshots__/Link.spec.ts.snap b/test/components/__snapshots__/Link.spec.ts.snap index 88603153e5..4a7bc3ed98 100644 --- a/test/components/__snapshots__/Link.spec.ts.snap +++ b/test/components/__snapshots__/Link.spec.ts.snap @@ -10,8 +10,16 @@ exports[`Link > renders with default slot correctly 1`] = `""`; +exports[`Link > renders with external prop correctly 1`] = `""`; + +exports[`Link > renders with external to and target correctly 1`] = `""`; + +exports[`Link > renders with external to correctly 1`] = `""`; + exports[`Link > renders with inactiveClass correctly 1`] = `""`; +exports[`Link > renders with internal to and target correctly 1`] = `""`; + exports[`Link > renders with raw activeClass correctly 1`] = `""`; exports[`Link > renders with raw correctly 1`] = `""`;