Skip to content

router-link integration with custom components #2021

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Leopoldthecoder opened this issue Jan 26, 2018 · 5 comments
Closed

router-link integration with custom components #2021

Leopoldthecoder opened this issue Jan 26, 2018 · 5 comments
Labels
feature request group[router-link redesign] Issues regarding a redesign in current router-link implementation to make it make it more customizab

Comments

@Leopoldthecoder
Copy link

Version

3.0.1

Reproduction link

http://jsfiddle.net/leopoldthecuber/forzLu80/38/

Steps to reproduce

Run the demo. In the demo I mainly did two things:

  • a custom component my-button, it has a prop content and a named slot icon
  • a router-link with its tag set to my-button

What is expected?

Props and named slots can be passed to custom component.

What is actually happening?

Props and named slots don't work


@QingWei-Li
Copy link

If router-link is a functional component, this feature will be supported. Then I did that, and all the tests passed.
But I am not sure if this is correct. 😂

@miljan-aleksic
Copy link
Contributor

I assumed this was working and just tested now on a new project confirming it does not. If there is anyway we can help to push this forward, let us know.

@posva
Copy link
Member

posva commented Jan 29, 2018

Yes, it should be. We wanted to make router link functional components for a while but never took the time to actually do it. So if you want to open a pr for 5yat,that would be great 😄 (since you have already coded it)

@0m4r
Copy link

0m4r commented Mar 14, 2018

is there any chance #1678 gets fixed? or any idea if it will ever be and when?

@posva posva added the group[router-link redesign] Issues regarding a redesign in current router-link implementation to make it make it more customizab label Mar 26, 2019
@posva
Copy link
Member

posva commented Apr 20, 2020

The recommended approach is to use the v-slot api of router-link. Making router-link functional would be a breaking change and thus isn't possible

@posva posva closed this as completed Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request group[router-link redesign] Issues regarding a redesign in current router-link implementation to make it make it more customizab
Projects
None yet
Development

No branches or pull requests

5 participants