feat(nuxt3): support custom prop for <nuxt-link>#4249
Conversation
✅ Deploy Preview for nuxt3-docs canceled.
|
|
|
||
| return h('a', { href, rel, target }, slots.default()) | ||
| return props.custom | ||
| ? slots.default && slots.default({ href, rel, target }) |
There was a problem hiding this comment.
Not sure about all possible context keys but shall we provide navigate (aliased to navigateTo) and rotue (lazy getter of useRoute) to be identicaL to vue-router API?
There was a problem hiding this comment.
We can provide them with the help of useLink, and also rel and target
There was a problem hiding this comment.
Nice idea but useLink implementation is not universal yet. We need to implement it here
There was a problem hiding this comment.
Something like that? (last commit)
There was a problem hiding this comment.
No, actually. Universal utils don't use vue-router dependency but mimic its API.
custom prop for <nuxt-link>
|
Pushed some fixes. Only question remaining in my mind is whether we want to normalise the bound props passed to the default slot between external/internal links. (so would need to pass a |
How do you imagine extending vue-router's route type for external routes? In general, it wouldn't be a bad idea to me always providing a normalized |
|
Thanks <3 |
🔗 Linked issue
nuxt/nuxt#13485
❓ Type of change
📚 Description
Resolves nuxt/nuxt#13485
📝 Checklist