Skip to content
New issue

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

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

Already on GitHub? # to your account

Ability to use Vue Router router-link component in menus #84

Closed
djmattyg007 opened this issue Jun 12, 2021 · 13 comments · Fixed by #191
Closed

Ability to use Vue Router router-link component in menus #84

djmattyg007 opened this issue Jun 12, 2021 · 13 comments · Fixed by #191
Assignees
Labels
feature request New feature or request

Comments

@djmattyg007
Copy link

Menu items should have the option of creating router-link components to support native routing functionality provided by Vue Router. This should also ensure actual <a> tags are generated, so as to be more friendly to accessibility.

@07akioni 07akioni added the feature request New feature or request label Jun 12, 2021
@07akioni
Copy link
Collaborator

The demand does exist. The API should be designed carefully. I need to think it for some time.

@07akioni
Copy link
Collaborator

@djmattyg007
Copy link
Author

Would you consider updating the menus on the documentation site to use this? The current way of how it handles navigation means I can't middle-click the links to open them in new tabs, which is very frustrating.

@djmattyg007
Copy link
Author

I definitely appreciate the flexibility of this approach, but it would be nice to have a slightly nicer way of handling the common use case of a <router-link> with route props. This will end up being very verbose for longer menus.

@07akioni
Copy link
Collaborator

Would you consider updating the menus on the documentation site to use this? The current way of how it handles navigation means I can't middle-click the links to open them in new tabs, which is very frustrating.

You can click
image

And a new tab will be opened.

image

@07akioni
Copy link
Collaborator

I definitely appreciate the flexibility of this approach, but it would be nice to have a slightly nicer way of handling the common use case of a <router-link> with route props. This will end up being very verbose for longer menus.

I can understand your concern. I'm not going to add props directly relevent to router-link since it will make option verbose.

Instead I think it's possible to create a render-label prop for menu if you want to create a longer menu will duplicate logic.

@07akioni 07akioni reopened this Jun 15, 2021
@djmattyg007
Copy link
Author

I meant the main navigation links on the docs site:

image

I can't middle click these, nor can I see where they will take me by hovering over them. This is because they are not regular links.

@07akioni
Copy link
Collaborator

07akioni commented Jun 15, 2021

I meant the main navigation links on the docs site:

image

I can't middle click these, nor can I see where they will take me by hovering over them. This is because they are not regular links.

I got it. I'll try and this may take a while.

@djmattyg007
Copy link
Author

this may take a while

That's part of why I suggested providing a nicer way of using <router-link> specifically 😉

@XieZongChen
Copy link
Collaborator

I'll develop it

@07akioni
Copy link
Collaborator

this may take a while

That's part of why I suggested providing a nicer way of using <router-link> specifically 😉

Done

@djmattyg007
Copy link
Author

👍 I think this was a great solution, thank you!

@ghost
Copy link

ghost commented Dec 14, 2021

这可能需要一段时间

这就是为什么我建议提供一种更好的方法来专门使用😉<router-link>

Your solution solves my need. thank you

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants