Ofuscate link with NuxtLink #20009
Closed
agracia-foticos
started this conversation in
General
Replies: 2 comments 7 replies
-
|
Probably the best would be writing a wrapper component around |
Beta Was this translation helpful? Give feedback.
7 replies
-
|
Why don't you replace NuxtLink for a div and add a @click? Before: <NuxtLink :to="...">
Content
</NuxtLink>After: <div @click="window.location(hrefProperty)">
Content
</div>Or even with an a as you mentioned: <a href="#" @click="window.location(hrefProperty)">
Content
</a>If you really need to use NuxtLink create a component that wraps that component: https://ogdenstudios.xyz/blog/nuxt-link-wrapper-for-general-vue-components/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We want change the behaviour of NuxtLink
We want remove href, and add
onClick="window.location(hrefProperty)"the final code is
<a href="#" onClick="window.location(hrefProperty)">Anchor text</a>I see that
https://nuxt.com/docs/api/components/nuxt-link#overwriting-defaults
And a custom property but i don't know how implemented it.
¿Any idea?
Thanks in advance!
Best Regards
Beta Was this translation helpful? Give feedback.
All reactions